|
NAMEQ_QADDQ , Q_QDIVQ ,
Q_QMULQ , Q_QSUBQ ,
Q_NORMPREC , Q_QMAXQ ,
Q_QMINQ , Q_QCLONEQ ,
Q_CPYVALQ —
fixed-point math functions which operate on two Q numbers
SYNOPSIS#include <sys/qmath.h>
int
int
int
int
int
QTYPE
QTYPE
int
int
DESCRIPTIONTheQ_QADDQ (), Q_QDIVQ (),
Q_QMULQ (), and Q_QSUBQ ()
functions add, divide, multiply or subtract b to/by/from
a respectively, storing the result in
a. Both arguments must be initialized with the same
fractional radix point.
The The The 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 VALUESTheQ_QADDQ (), Q_QDIVQ (),
Q_QMULQ (), Q_QSUBQ ()
Q_NORMPREC (), Q_QCLONEQ () and
Q_QCPYVALQ () functions return 0 on success, or an
errno on failure. EINVAL is returned for
divide-by-zero. EOVERFLOW and
ERANGE are returned for overflow and underflow
respectively. ERANGE is also returned when the precision of
arguments does not match.
The SEE ALSOerrno(2), qmath(3), stdint(7)HISTORYThe qmath(3) functions first appeared in FreeBSD 13.0.AUTHORSThe qmath(3) functions and this manual page were written by Lawrence Stewart <lstewart@FreeBSD.org> and sponsored by Netflix, Inc.
Visit the GSP FreeBSD Man Page Interface. |