math-library-operators.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <html lang="en">
  2. <head>
  3. <title>math library operators - 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.html#math" title="math">
  10. <link rel="next" href="math-library-predicates.html#math-library-predicates" title="math library predicates">
  11. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  12. <meta http-equiv="Content-Style-Type" content="text/css">
  13. <style type="text/css"><!--
  14. pre.display { font-family:inherit }
  15. pre.format { font-family:inherit }
  16. pre.smalldisplay { font-family:inherit; font-size:smaller }
  17. pre.smallformat { font-family:inherit; font-size:smaller }
  18. pre.smallexample { font-size:smaller }
  19. pre.smalllisp { font-size:smaller }
  20. span.sc { font-variant:small-caps }
  21. span.roman { font-family:serif; font-weight:normal; }
  22. span.sansserif { font-family:sans-serif; font-weight:normal; }
  23. --></style>
  24. </head>
  25. <body>
  26. <div class="node">
  27. <a name="math-library-operators"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="math-library-predicates.html#math-library-predicates">math library predicates</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="math.html#math">math</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="math.html#math">math</a>
  32. <hr>
  33. </div>
  34. <h4 class="subsection">D.11.1 <code>math</code> library operators</h4>
  35. <p>The unary operators take a single real number to a real result. They
  36. <a name="index-trigonometric-functions-767"></a>include
  37. <pre class="example"> ceil floor round trunc
  38. sin cos tan sinh cosh tanh
  39. asin acos atan asinh acosh atanh
  40. exp log sqrt cbrt expm1 log1p fabs
  41. </pre>
  42. <p>The binary operators take a pair of real numbers <code>(</code><var>x</var><code>,</code><var>y</var><code>)</code> to
  43. a single real number output. They include
  44. <pre class="example"> pow hypot atan2 remainder bus vid add sub mul div
  45. </pre>
  46. <p class="noindent">where the last four correspond to the C language operators <code>+</code>,
  47. <code>-</code>, <code>*</code>, and <code>/</code>. The functions named <code>bus</code> and
  48. <code>vid</code> are like the <code>sub</code> and <code>div</code> functions,
  49. respectively, with the order of the operands reversed, as explained in
  50. <a href="complex.html#complex">complex</a>.
  51. <p>The meanings of these operators are documented in the GNU <code>libc</code> reference
  52. manual or other C language references. They follow IEEE standards including
  53. proper handling of <code>nan</code> and infinity.
  54. </body></html>