math-library-exceptions.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <html lang="en">
  2. <head>
  3. <title>math library exceptions - 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-conversion-functions.html#math-library-conversion-functions" title="math library conversion functions">
  10. <link rel="next" href="Additional-math-library-notes.html#Additional-math-library-notes" title="Additional math library notes">
  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-exceptions"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="Additional-math-library-notes.html#Additional-math-library-notes">Additional math library notes</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="math-library-conversion-functions.html#math-library-conversion-functions">math library conversion functions</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.4 <code>math</code> library exceptions</h4>
  35. <p>The most likely cause of an exception is an attempt to apply a
  36. <code>math</code> library function to <code>nil</code> or to an argument that
  37. doesn't represent a floating point number. In these cases, an error
  38. <a name="index-missing-value-771"></a><a name="index-invalid-value-772"></a>message of <code>&lt;'missing value'&gt;</code> or <code>&lt;'invalid value'&gt;</code> will
  39. be the result.
  40. <p>An error message of <code>&lt;'invalid asprintf() specifier'&gt;</code> is
  41. <a name="index-invalid-asprintf-specifier-773"></a>reported by the <code>asprintf</code> function if the format specifier
  42. <a name="index-asprintf-774"></a>pertains to a string, such as <code>'%s'</code>. This error is specifically
  43. trapped because the alternative would be a segmentation
  44. <a name="index-segmentation-fault-775"></a>fault. Otherwise, invalid format specifiers are not detected or
  45. reported.
  46. <p>Error messages of <code>&lt;'invalid text format'&gt;</code> can be generated
  47. <a name="index-invalid-text-format-776"></a>by conversion functions if any parameters that are meant to be
  48. character string representations are something else.
  49. <p>There is always a chance of a <code>&lt;'memory overflow'&gt;</code> error if
  50. there is insufficient memory to allocate a result.
  51. </body></html>