diff options
Diffstat (limited to 'static/freebsd/man3/Q_QADDQ.3 3.html')
| -rw-r--r-- | static/freebsd/man3/Q_QADDQ.3 3.html | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/static/freebsd/man3/Q_QADDQ.3 3.html b/static/freebsd/man3/Q_QADDQ.3 3.html new file mode 100644 index 00000000..8306c7af --- /dev/null +++ b/static/freebsd/man3/Q_QADDQ.3 3.html @@ -0,0 +1,144 @@ +<table class="head"> + <tr> + <td class="head-ltitle">Q_QADDQ(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">Q_QADDQ(3)</td> + </tr> +</table> +<div class="manual-text"> +<section class="Sh"> +<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> +<p class="Pp"><code class="Nm">Q_QADDQ</code>, <code class="Nm">Q_QDIVQ</code>, + <code class="Nm">Q_QMULQ</code>, <code class="Nm">Q_QSUBQ</code>, + <code class="Nm">Q_NORMPREC</code>, <code class="Nm">Q_QMAXQ</code>, + <code class="Nm">Q_QMINQ</code>, <code class="Nm">Q_QCLONEQ</code>, + <code class="Nm">Q_CPYVALQ</code> — <span class="Nd">fixed-point math + functions which operate on two Q numbers</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> +<p class="Pp"><code class="In">#include + <<a class="In">sys/qmath.h</a>></code></p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QADDQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QDIVQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QMULQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QSUBQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_NORMPREC</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE *b</var>);</p> +<p class="Pp"><var class="Ft">QTYPE</var> + <br/> + <code class="Fn">Q_QMAXQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE b</var>);</p> +<p class="Pp"><var class="Ft">QTYPE</var> + <br/> + <code class="Fn">Q_QMINQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + a</var>, <var class="Fa" style="white-space: nowrap;">QTYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QCLONEQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *l</var>, <var class="Fa" style="white-space: nowrap;">QTYPE r</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QCPYVALQ</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *l</var>, <var class="Fa" style="white-space: nowrap;">QTYPE r</var>);</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> +<p class="Pp">The + <a class="permalink" href="#Q_QADDQ"><code class="Fn" id="Q_QADDQ">Q_QADDQ</code></a>(), + <a class="permalink" href="#Q_QDIVQ"><code class="Fn" id="Q_QDIVQ">Q_QDIVQ</code></a>(), + <a class="permalink" href="#Q_QMULQ"><code class="Fn" id="Q_QMULQ">Q_QMULQ</code></a>(), + and + <a class="permalink" href="#Q_QSUBQ"><code class="Fn" id="Q_QSUBQ">Q_QSUBQ</code></a>() + functions add, divide, multiply or subtract <var class="Fa">b</var> + to/by/from <var class="Fa">a</var> respectively, storing the result in + <var class="Fa">a</var>. Both arguments must be initialized with the same + fractional radix point.</p> +<p class="Pp" id="Q_NORMPREC">The + <a class="permalink" href="#Q_NORMPREC"><code class="Fn">Q_NORMPREC</code></a>() + function attempts to normalise the precision of <var class="Fa">a</var> and + <var class="Fa">b</var> if they differ. The greater of the two precisions is + preferred if possible, unless that would truncate integer component data for + the other operand, in which case the highest precision that preserves the + integer component of both <var class="Fa">a</var> and + <var class="Fa">b</var> is selected.</p> +<p class="Pp" id="Q_QMAXQ">The + <a class="permalink" href="#Q_QMAXQ"><code class="Fn">Q_QMAXQ</code></a>() + and + <a class="permalink" href="#Q_QMINQ"><code class="Fn" id="Q_QMINQ">Q_QMINQ</code></a>() + functions return the larger or smaller of <var class="Fa">a</var> and + <var class="Fa">b</var> respectively.</p> +<p class="Pp" id="Q_QCLONEQ">The + <a class="permalink" href="#Q_QCLONEQ"><code class="Fn">Q_QCLONEQ</code></a>() + and + <a class="permalink" href="#Q_QCPYVALQ"><code class="Fn" id="Q_QCPYVALQ">Q_QCPYVALQ</code></a>() + functions attempt to store identical or representational copies of + <var class="Fa">r</var>, in <var class="Fa">l</var> respectively. An + identical Q number produced by cloning copies the control bits as well as + the verbatim integer/fractional bits. A representational copy only copies + the values of <var class="Fa">r</var>'s integer and fractional bits, + representing them in the bits available per <var class="Fa">l</var>'s Q + format.</p> +<p class="Pp">All of those functions operate on the following data types: + <var class="Vt">s8q_t</var>, <var class="Vt">u8q_t</var>, + <var class="Vt">s16q_t</var>, <var class="Vt">u16q_t</var>, + <var class="Vt">s32q_t</var>, <var class="Vt">u32q_t</var>, + <var class="Vt">s64q_t</var>, and <var class="Vt">u64q_t</var>, which are + referred to generically as <var class="Fa">QTYPE</var>.</p> +<p class="Pp">For more details, see <a class="Xr">qmath(3)</a>.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="RETURN_VALUES"><a class="permalink" href="#RETURN_VALUES">RETURN + VALUES</a></h1> +<p class="Pp">The <code class="Fn">Q_QADDQ</code>(), + <code class="Fn">Q_QDIVQ</code>(), <code class="Fn">Q_QMULQ</code>(), + <code class="Fn">Q_QSUBQ</code>() <code class="Fn">Q_NORMPREC</code>(), + <code class="Fn">Q_QCLONEQ</code>() and <code class="Fn">Q_QCPYVALQ</code>() + functions return 0 on success, or an errno on failure. + <code class="Er">EINVAL</code> is returned for divide-by-zero. + <code class="Er">EOVERFLOW</code> and <code class="Er">ERANGE</code> are + returned for overflow and underflow respectively. <code class="Er">ERANGE is + also returned when the precision of arguments</code> does not match.</p> +<p class="Pp">The <code class="Fn">Q_QMAXQ</code>() and + <code class="Fn">Q_QMINQ</code>() functions return the numerically larger or + smaller of their two inputs respectively.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE + ALSO</a></h1> +<p class="Pp"><a class="Xr">errno(2)</a>, <a class="Xr">qmath(3)</a>, + <a class="Xr">stdint(7)</a></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> +<p class="Pp">The <a class="Xr">qmath(3)</a> functions first appeared in + <span class="Ux">FreeBSD 13.0</span>.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> +<p class="Pp">The <a class="Xr">qmath(3)</a> functions and this manual page were + written by <span class="An">Lawrence Stewart</span> + <<a class="Mt" href="mailto:lstewart@FreeBSD.org">lstewart@FreeBSD.org</a>> + and sponsored by Netflix, Inc.</p> +</section> +</div> +<table class="foot"> + <tr> + <td class="foot-date">July 8, 2018</td> + <td class="foot-os">FreeBSD 15.0</td> + </tr> +</table> |
