diff options
Diffstat (limited to 'static/freebsd/man3/fpgetround.3 4.html')
| -rw-r--r-- | static/freebsd/man3/fpgetround.3 4.html | 161 |
1 files changed, 0 insertions, 161 deletions
diff --git a/static/freebsd/man3/fpgetround.3 4.html b/static/freebsd/man3/fpgetround.3 4.html deleted file mode 100644 index 4547c0b3..00000000 --- a/static/freebsd/man3/fpgetround.3 4.html +++ /dev/null @@ -1,161 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">FPGETROUND(3)</td> - <td class="head-vol">Library Functions Manual</td> - <td class="head-rtitle">FPGETROUND(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">fpgetround</code>, - <code class="Nm">fpsetround</code>, <code class="Nm">fpsetprec</code>, - <code class="Nm">fpgetprec</code>, <code class="Nm">fpgetmask</code>, - <code class="Nm">fpsetmask</code>, <code class="Nm">fpgetsticky</code>, - <code class="Nm">fpresetsticky</code> — <span class="Nd">IEEE - floating point interface</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">ieeefp.h</a>></code></p> -<div class="Bd Pp Li"> -<pre>typedef enum { - FP_RN, /* round to nearest */ - FP_RM, /* round down to minus infinity */ - FP_RP, /* round up to plus infinity */ - FP_RZ /* truncate */ -} fp_rnd_t;</pre> -</div> -<br/> -<var class="Ft">fp_rnd_t</var> -<br/> -<code class="Fn">fpgetround</code>(<var class="Fa" style="white-space: nowrap;">void</var>); -<p class="Pp"><var class="Ft">fp_rnd_t</var> - <br/> - <code class="Fn">fpsetround</code>(<var class="Fa" style="white-space: nowrap;">fp_rnd_t - direction</var>);</p> -<div class="Bd Pp Li"> -<pre>typedef enum { - FP_PS, /* 24 bit (single-precision) */ - FP_PRS, /* reserved */ - FP_PD, /* 53 bit (double-precision) */ - FP_PE /* 64 bit (extended-precision) */ -} fp_prec_t;</pre> -</div> -<br/> -<var class="Ft">fp_prec_t</var> -<br/> -<code class="Fn">fpgetprec</code>(<var class="Fa" style="white-space: nowrap;">void</var>); -<p class="Pp"><var class="Ft">fp_prec_t</var> - <br/> - <code class="Fn">fpsetprec</code>(<var class="Fa" style="white-space: nowrap;">fp_prec_t - precision</var>);</p> -<div class="Bd Pp Li"> -<pre>#define fp_except_t int -#define FP_X_INV 0x01 /* invalid operation */ -#define FP_X_DNML 0x02 /* denormal */ -#define FP_X_DZ 0x04 /* zero divide */ -#define FP_X_OFL 0x08 /* overflow */ -#define FP_X_UFL 0x10 /* underflow */ -#define FP_X_IMP 0x20 /* (im)precision */ -#define FP_X_STK 0x40 /* stack fault */</pre> -</div> -<br/> -<var class="Ft">fp_except_t</var> -<br/> -<code class="Fn">fpgetmask</code>(<var class="Fa" style="white-space: nowrap;">void</var>); -<p class="Pp"><var class="Ft">fp_except_t</var> - <br/> - <code class="Fn">fpsetmask</code>(<var class="Fa" style="white-space: nowrap;">fp_except_t - mask</var>);</p> -<p class="Pp"><var class="Ft">fp_except_t</var> - <br/> - <code class="Fn">fpgetsticky</code>(<var class="Fa" style="white-space: nowrap;">void</var>);</p> -<p class="Pp"><var class="Ft">fp_except_t</var> - <br/> - <code class="Fn">fpresetsticky</code>(<var class="Fa" style="white-space: nowrap;">fp_except_t - sticky</var>);</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The routines described herein are deprecated. New code should use - the functionality provided by <a class="Xr">fenv(3)</a>.</p> -<p class="Pp">When a floating point exception is detected, the exception sticky - flag is set and the exception mask is tested. If the mask is set, then a - trap occurs. These routines allow both setting the floating point exception - masks, and resetting the exception sticky flags after an exception is - detected. In addition, they allow setting the floating point rounding mode - and precision.</p> -<p class="Pp" id="fpgetround">The - <a class="permalink" href="#fpgetround"><code class="Fn">fpgetround</code></a>() - function returns the current floating point rounding mode.</p> -<p class="Pp" id="fpsetround">The - <a class="permalink" href="#fpsetround"><code class="Fn">fpsetround</code></a>() - function sets the floating point rounding mode and returns the previous - mode.</p> -<p class="Pp" id="fpgetprec">The - <a class="permalink" href="#fpgetprec"><code class="Fn">fpgetprec</code></a>() - function returns the current floating point precision.</p> -<p class="Pp" id="fpsetprec">The - <a class="permalink" href="#fpsetprec"><code class="Fn">fpsetprec</code></a>() - function sets the floating point precision and returns the previous - precision.</p> -<p class="Pp" id="fpgetmask">The - <a class="permalink" href="#fpgetmask"><code class="Fn">fpgetmask</code></a>() - function returns the current floating point exception masks.</p> -<p class="Pp" id="fpsetmask">The - <a class="permalink" href="#fpsetmask"><code class="Fn">fpsetmask</code></a>() - function sets the floating point exception masks and returns the previous - masks.</p> -<p class="Pp" id="fpgetsticky">The - <a class="permalink" href="#fpgetsticky"><code class="Fn">fpgetsticky</code></a>() - function returns the current floating point sticky flags.</p> -<p class="Pp" id="fpresetsticky">The - <a class="permalink" href="#fpresetsticky"><code class="Fn">fpresetsticky</code></a>() - function clears the floating point sticky flags and returns the previous - flags.</p> -<p class="Pp">Sample code which prevents a trap on divide-by-zero:</p> -<div class="Bd Pp Bd-indent Li"> -<pre>fpsetmask(~FP_X_DZ); -a = 1.0; -b = 0; -c = a / b; -fpresetsticky(FP_X_DZ); -fpsetmask(FP_X_DZ);</pre> -</div> -</section> -<section class="Sh"> -<h1 class="Sh" id="IMPLEMENTATION_NOTES"><a class="permalink" href="#IMPLEMENTATION_NOTES">IMPLEMENTATION - NOTES</a></h1> -<p class="Pp">The <code class="Fn">fpgetprec</code>() and - <code class="Fn">fpsetprec</code>() functions provide functionality - unavailable on many platforms. At present, they are implemented only on the - i386 and amd64 platforms. Changing precision is not a supported feature: it - may be ineffective when code is compiled to take advantage of SSE, and many - library functions and compiler optimizations depend upon the default - precision for correct behavior.</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">fenv(3)</a>, <a class="Xr">isnan(3)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> -<p class="Pp">These routines are based on SysV/386 routines of the same - name.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="CAVEATS"><a class="permalink" href="#CAVEATS">CAVEATS</a></h1> -<p class="Pp">After a floating point exception and before a mask is set, the - sticky flags must be reset. If another exception occurs before the sticky - flags are reset, then a wrong exception type may be signaled.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">December 3, 2010</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
