diff options
Diffstat (limited to 'static/freebsd/man3/Q_QADDI.3 3.html')
| -rw-r--r-- | static/freebsd/man3/Q_QADDI.3 3.html | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/static/freebsd/man3/Q_QADDI.3 3.html b/static/freebsd/man3/Q_QADDI.3 3.html new file mode 100644 index 00000000..67faa1cf --- /dev/null +++ b/static/freebsd/man3/Q_QADDI.3 3.html @@ -0,0 +1,113 @@ +<table class="head"> + <tr> + <td class="head-ltitle">Q_QADDI(3)</td> + <td class="head-vol">Library Functions Manual</td> + <td class="head-rtitle">Q_QADDI(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_QADDI</code>, <code class="Nm">Q_QDIVI</code>, + <code class="Nm">Q_QMULI</code>, <code class="Nm">Q_QSUBI</code>, + <code class="Nm">Q_QFRACI</code>, <code class="Nm">Q_QCPYVALI</code> + — <span class="Nd">fixed-point math functions which apply integers to + a Q number</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_QADDI</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">ITYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QDIVI</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">ITYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QMULI</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">ITYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QSUBI</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *a</var>, <var class="Fa" style="white-space: nowrap;">ITYPE b</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QFRACI</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *q</var>, <var class="Fa" style="white-space: nowrap;">ITYPE n</var>, + <var class="Fa" style="white-space: nowrap;">ITYPE d</var>);</p> +<p class="Pp"><var class="Ft">int</var> + <br/> + <code class="Fn">Q_QCPYVALI</code>(<var class="Fa" style="white-space: nowrap;">QTYPE + *q</var>, <var class="Fa" style="white-space: nowrap;">ITYPE i</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_QADDI"><code class="Fn" id="Q_QADDI">Q_QADDI</code></a>(), + <a class="permalink" href="#Q_QDIVI"><code class="Fn" id="Q_QDIVI">Q_QDIVI</code></a>(), + <a class="permalink" href="#Q_QMULI"><code class="Fn" id="Q_QMULI">Q_QMULI</code></a>() + and + <a class="permalink" href="#Q_QSUBI"><code class="Fn" id="Q_QSUBI">Q_QSUBI</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>.</p> +<p class="Pp" id="Q_QFRACI">The + <a class="permalink" href="#Q_QFRACI"><code class="Fn">Q_QFRACI</code></a>() + function computes the fraction <var class="Fa">n</var> divided by + <var class="Fa">d</var> and stores the fixed-point result in + <var class="Fa">q</var>.</p> +<p class="Pp" id="Q_QCPYVALI">The + <a class="permalink" href="#Q_QCPYVALI"><code class="Fn">Q_QCPYVALI</code></a>() + function overwrites <var class="Fa">q</var>'s integer and fractional bits + with the Q representation of integer value <var class="Fa">i</var>.</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>. The + <var class="Fa">ITYPE</var> refers to the <a class="Xr">stdint(7)</a> + integer types.</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"><code class="Fn">Q_QADDI</code>(), + <code class="Fn">Q_QDIVI</code>(), <code class="Fn">Q_QMULI</code>(), + <code class="Fn">Q_QSUBI</code>(), <code class="Fn">Q_QFRACI</code>() and + <code class="Fn">Q_QCPYVALI</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.</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> |
