*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: Q_QFRACI | Section: 3 | Source: FreeBSD | File: Q_QFRACI.3.gz
Q_QADDI(3) FreeBSD Library Functions Manual Q_QADDI(3) NAME Q_QADDI, Q_QDIVI, Q_QMULI, Q_QSUBI, Q_QFRACI, Q_QCPYVALI - fixed-point math functions which apply integers to a Q number SYNOPSIS #include <sys/qmath.h> int Q_QADDI(QTYPE *a, ITYPE b); int Q_QDIVI(QTYPE *a, ITYPE b); int Q_QMULI(QTYPE *a, ITYPE b); int Q_QSUBI(QTYPE *a, ITYPE b); int Q_QFRACI(QTYPE *q, ITYPE n, ITYPE d); int Q_QCPYVALI(QTYPE *q, ITYPE i); DESCRIPTION The Q_QADDI(), Q_QDIVI(), Q_QMULI() and Q_QSUBI() functions add, divide, multiply or subtract b to/by/from a respectively, storing the result in a. The Q_QFRACI() function computes the fraction n divided by d and stores the fixed-point result in q. The Q_QCPYVALI() function overwrites q's integer and fractional bits with the Q representation of integer value i. 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_QADDI(), Q_QDIVI(), Q_QMULI(), Q_QSUBI(), Q_QFRACI() and Q_QCPYVALI() 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. 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 <[email protected]> and sponsored by Netflix, Inc. FreeBSD 14.1-RELEASE-p8 July 8, 2018 FreeBSD 14.1-RELEASE-p8

Navigation Options