mpfr-functions-with-miscellaneous-calling-conventions.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <html lang="en">
  2. <head>
  3. <title>mpfr functions with miscellaneous calling conventions - 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="mpfr.html#mpfr" title="mpfr">
  9. <link rel="prev" href="mpfr-constants.html#mpfr-constants" title="mpfr constants">
  10. <link rel="next" href="mpfr-conversion-functions.html#mpfr-conversion-functions" title="mpfr conversion functions">
  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="mpfr-functions-with-miscellaneous-calling-conventions"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="mpfr-conversion-functions.html#mpfr-conversion-functions">mpfr conversion functions</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="mpfr-constants.html#mpfr-constants">mpfr constants</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="mpfr.html#mpfr">mpfr</a>
  32. <hr>
  33. </div>
  34. <h4 class="subsection">D.14.7 <code>mpfr</code> functions with miscellaneous calling conventions</h4>
  35. <p>Some functions listed below don't conform to any of the previously
  36. mentioned calling conventions.
  37. <dl>
  38. <dt><code>eq</code><dd>This is a ternary operator taking a triple
  39. <code>(</code><var>prec</var><code>,(</code><var>x</var><code>,</code><var>y</var><code>))</code>, where <var>prec</var> is a natural
  40. number and <var>x</var> and <var>y</var> are <code>mpfr</code> numbers. It returns a
  41. result of <code>(nil,nil)</code> (i.e., true) if the numbers agree up to the
  42. specified precision measured in bits, and returns <code>nil</code>
  43. otherwise.<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>
  44. <br><dt><code>urandomb</code><dd>This function takes a natural number specifying a precision and
  45. <a name="index-random-numbers-798"></a>returns a uniformly distributed pseudo-random number of that precision
  46. between 0 and 1.
  47. <br><dt><code>prec</code><dd>This function takes an <code>mpfr</code> number and returns a natural number
  48. as a result, which is the precision of the argument in bits.
  49. <br><dt><code>sin_cos</code><dd>This function takes an <code>mpfr</code> number <var>z</var> as an argument and
  50. returns a pair of <code>mpfr</code> numbers <code>(</code><var>x</var><code>,</code><var>y</var><code>)</code> as a
  51. result, where <var>x</var> is the sine of <var>z</var> and <var>y</var> is the cosine. The
  52. precisions of the results are the same as the precision of the
  53. argument.
  54. </dl>
  55. <div class="footnote">
  56. <hr>
  57. <h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> a potentially useful tool for algorithms concerned
  58. with numerical approximations despite its inexplicable malignment in
  59. the <code>mpfr</code> documentation</p>
  60. <hr></div>
  61. </body></html>