Additional-math-library-notes.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <html lang="en">
  2. <head>
  3. <title>Additional math library notes - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="math.html#math" title="math">
  9. <link rel="prev" href="math-library-exceptions.html#math-library-exceptions" title="math library exceptions">
  10. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  11. <meta http-equiv="Content-Style-Type" content="text/css">
  12. <style type="text/css"><!--
  13. pre.display { font-family:inherit }
  14. pre.format { font-family:inherit }
  15. pre.smalldisplay { font-family:inherit; font-size:smaller }
  16. pre.smallformat { font-family:inherit; font-size:smaller }
  17. pre.smallexample { font-size:smaller }
  18. pre.smalllisp { font-size:smaller }
  19. span.sc { font-variant:small-caps }
  20. span.roman { font-family:serif; font-weight:normal; }
  21. span.sansserif { font-family:sans-serif; font-weight:normal; }
  22. --></style>
  23. </head>
  24. <body>
  25. <div class="node">
  26. <a name="Additional-math-library-notes"></a>
  27. <p>
  28. Previous:&nbsp;<a rel="previous" accesskey="p" href="math-library-exceptions.html#math-library-exceptions">math library exceptions</a>,
  29. Up:&nbsp;<a rel="up" accesskey="u" href="math.html#math">math</a>
  30. <hr>
  31. </div>
  32. <h4 class="subsection">D.11.5 Additional <code>math</code> library notes</h4>
  33. <p>Floating point exceptions such as division by zero are not
  34. specifically reported as exceptions, but invalid computations can be
  35. <a name="index-nan-777"></a>detected by the propagation of <code>nan</code> into the result, following
  36. standard conventions.
  37. <p>The C function <code>feclearexcept (FE_ALL_EXCEPT)</code> is called before
  38. <a name="index-feclearexcept-778"></a>every floating point operation so that no lingering exception flags
  39. can affect it.
  40. <p>There is no library predicate for exact comparison of floating point
  41. numbers, but none is required because the virtual machine's
  42. <code>compare</code> combinator will work on their representations as it
  43. <a name="index-compare-combinator-779"></a>will on any other data. The usual caveats apply with regard to
  44. comparing floating point numbers in the presence of roundoff error.
  45. </body></html>