tail head cat sleep
QR code linking to this page

Manual Pages  — Q_FRAWMASK

NAME

Q_FRAWMASK, Q_GFRAW, Q_GFABSVAL, Q_GFVAL, Q_SFVAL – fixed-point math functions which manipulate the fractional data bits

CONTENTS

SYNOPSIS

#include <sys/qmath.h>

ITYPE
Q_FRAWMASK(QTYPE q);

ITYPE
Q_GFRAW(QTYPE q);

ITYPE
Q_GFABSVAL(QTYPE q);

ITYPE
Q_GFVAL(QTYPE q);

QTYPE
Q_SFVAL(QTYPE q, ITYPE fv);

DESCRIPTION

Q_FRAWMASK() returns a q, Ns, -specific bit mask for q, Ap, s fractional data bits.

Q_GFRAW() returns q, Ap, s raw masked fractional data bits.

Q_GFABSVAL() and Q_GFVAL() return the absolute and real values of q, Ap, s fractional data bits respectively.

Q_SFVAL() sets q, Ap, s fractional data bits to the value fv.

All of those functions operate on the following data types: s8q_t, u8q_t, s16q_t, u16q_t, s32q_t, u32q_t, s64q_t, and u64q_t, which are referred to generically as QTYPE. The ITYPE refers to the stdint(7) integer types.

For more details, see qmath(3).

RETURN VALUES

Q_FRAWMASK(), Q_GFRAW(), Q_GFABSVAL() and Q_GFVAL() return their respective values as integers of the same underlying ITYPE as q.

Q_SFVAL() returns the value of q post set.

SEE ALSO

errno(2), qmath(3), stdint(7)

HISTORY

The qmath(3) functions first appeared in FreeBSD 13.0 .

AUTHORS

The qmath(3) functions and this manual page were written by Lawrence Stewart <Mt lstewart@FreeBSD.org> and sponsored by Netflix, Inc.

Q_FRAWMASK (3) July 8, 2018

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology.
— The Unix Haters' handbook