mpfr-binary-predicates.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <html lang="en">
  2. <head>
  3. <title>mpfr binary predicates - 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-binary-operators-with-a-natural-operand.html#mpfr-binary-operators-with-a-natural-operand" title="mpfr binary operators with a natural operand">
  10. <link rel="next" href="mpfr-unary-predicates.html#mpfr-unary-predicates" title="mpfr unary 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="mpfr-binary-predicates"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="mpfr-unary-predicates.html#mpfr-unary-predicates">mpfr unary predicates</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="mpfr-binary-operators-with-a-natural-operand.html#mpfr-binary-operators-with-a-natural-operand">mpfr binary operators with a natural operand</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.4 <code>mpfr</code> binary predicates</h4>
  35. <p>These predicates take a pair of <code>mpfr</code> numbers
  36. <code>(</code><var>x</var><code>,</code><var>y</var><code>)</code> as arguments and perform a logical operation.
  37. If the result is true, they return <code>(nil,nil)</code>, and if it's
  38. false, they return <code>nil</code>.
  39. <ul>
  40. <li><code>equal_p</code>
  41. <li><code>unequal_abs</code>
  42. <li><code>greater_p</code>
  43. <li><code>greaterequal_p</code>
  44. <li><code>less_p</code>
  45. <li><code>lessequal_p</code>
  46. <li><code>lessgreater_p</code>
  47. </ul>
  48. <p>The name of the function <code>unequal_abs</code>, for comparing absolute
  49. values, has been changed from <code>mpfr_cmpabs</code> to avoid confusion
  50. with the virtual machine's <code>compare</code> combinator. The
  51. <code>compare</code> combinator returns a <code>(nil,nil)</code> result (i.e.,
  52. true) if the
  53. <a name="index-compare-combinator-796"></a>operands are equal and a <code>nil</code> result if they're unequal,
  54. opposite from <code>unequal_abs</code>.
  55. </body></html>