---
name: "Q_IRAWMASK"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/Q_GIABSVAL"
---

# Q\_IRAWMASK(3)

fixed-point math functions which manipulate the integer data bits

Part of [Q\_GIABSVAL(3)](/Q_GIABSVAL/3.md).

## NAME

**Q\_IRAWMASK**, **Q\_GIRAW**, **Q\_GIABSVAL**, **Q\_GIVAL**, **Q\_SIVAL** – fixed-point math functions which manipulate the integer data bits

## 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*);

## DESCRIPTION

**Q\_IRAWMASK**() returns a *q*-specific bit mask for *q*'s integer data bits.

**Q\_GIRAW**() returns *q*'s raw masked integer data bits.

**Q\_GIABSVAL**() and **Q\_GIVAL**() return the absolute and real values of *q*'s integer data bits respectively.

**Q\_SIVAL**() sets *q*'s integer data bits to the value *iv*.

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)](/stdint/7.md) integer types.

For more details, see [qmath(3)](/qmath/3.md).

## RETURN VALUES

**Q\_IRAWMASK**(), **Q\_GIRAW**(), **Q\_GIABSVAL**() and **Q\_GIVAL**() return their respective values as integers of the same underlying ITYPE as *q*.

**Q\_SIVAL**() returns the value of *q* post change.

## SEE ALSO

[errno(2)](/errno/2.md), [qmath(3)](/qmath/3.md), [stdint(7)](/stdint/7.md)

## HISTORY

The [qmath(3)](/qmath/3.md) functions first appeared in FreeBSD 13.0.

## AUTHORS

The [qmath(3)](/qmath/3.md) functions and this manual page were written by Lawrence Stewart ⟨*lstewart@FreeBSD.org*⟩ and sponsored by Netflix, Inc.
