Q_Q2F(3)

Q_Q2F3

Fixed-point math functions which operate on a single q number

Part of Q_QABS(3).

Usage

#include <sys/qmath.h>

QTYPE

Q_QABS(QTYPE q);

double

Q_Q2D(QTYPE q);

float

Q_Q2F(QTYPE q);

Overview

The Q_QABS() function returns an absolute value representation of q.

The Q_Q2D() and Q_Q2F() functions return the double and float representations of q respectively.

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.

For more details, see qmath(3).

Return values

Q_QABS() function returns a QTYPE that is identical to that of q.

The Q_Q2D() and Q_Q2F() functions return the double and float representations of q respectively.

Releases

15 releases since FreeBSD 13.0-RELEASE; the text changed 1 time.

  1. 13.0–13.2
  2. 13.3–16.0

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 ⟨[email protected]⟩ and sponsored by Netflix, Inc.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.