Q_IRAWMASK(3)
π Q_IRAWMASK(3) β the library-functions-manual girlypop edition π
okay so bestie, we're in section 3 of the library functions manual and this page is literally about the fixed-point math functions that mess with the integer data bits. no cap. let's get into it π¦
β¨ NAME β¨
Q_IRAWMASK, Q_GIRAW, Q_GIABSVAL, Q_GIVAL, Q_SIVAL β fixed-point math functions which manipulate the integer data bits πΈ
like, they don't touch the fractional vibes at all, they're strictly here for the integer bits. main character energy tbh π
π SYNOPSIS π
#include <sys/qmath.h>
ITYPE
Q_IRAWMASK(QTYPE q);
ITYPE
Q_GIRAW(QTYPE q);
ITYPE
Q_GIABSVAL(QTYPE q);
ITYPE
Q_GIVAL(QTYPE q);
QTYPE
Q_SIVAL(QTYPE q, ITYPE iv);
yes the include is #include <sys/qmath.h>, write it down, don't @ me π«Ά
π DESCRIPTION π
so here's the whole squad, one by one:
Q_IRAWMASK()β returns a q-specific bit mask for q's integer data bits. it's giving "here's the mask that belongs to your q" β¨Q_GIRAW()β returns q's raw masked integer data bits. raw. masked. integer. bits. all four πQ_GIABSVAL()andQ_GIVAL()β these two besties return the absolute and real values of q's integer data bits respectively π (yes, respectively β absolute first, real second, keep the order!)Q_SIVAL()β sets q's integer data bits to the valueiv. the setter of the group π
and the tea on the types β: all of those functions operate on the following data types:
s8q_tu8q_ts16q_tu16q_ts32q_tu32q_ts64q_tu64q_t
which are referred to generically as QTYPE. and ITYPE refers to the stdint(7) integer types. iykyk π§
for more details, see qmath(3). go read it, i'll wait π
β RETURN VALUES β
Q_IRAWMASK(),Q_GIRAW(),Q_GIABSVAL()andQ_GIVAL()return their respective values as integers of the same underlying ITYPE asq. same underlying type, always β no sneaky conversions π₯Q_SIVAL()returns the value ofqpost change. post! change! like after the glow-up π
π¦ SEE ALSO π¦
(the friend group π―ββοΈ go say hi)
πΈ HISTORY πΈ
the qmath(3) functions first appeared in FreeBSD 13.0. iconic debut, no notes π
π AUTHORS π
the qmath(3) functions and this manual page were written by Lawrence Stewart <lstewart@FreeBSD.org> and sponsored by Netflix, Inc. β yes that Netflix, we stan a sponsored manpage πΏπ
ok that's the whole page fr fr β every flag, type, and reference accounted for, nothing skipped, nothing invented. vibe check: passed β
and that's the wrap bestie π this lil beauty is from the Debian fam, dated July 8, 2018, filed right back under Q_IRAWMASK(3) β mwah, see u in the next manpage ππ«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2018 Netflix, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms