gslint-input-parameters.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <html lang="en">
  2. <head>
  3. <title>gslint input parameters - 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="gslint.html#gslint" title="gslint">
  9. <link rel="prev" href="gslint.html#gslint" title="gslint">
  10. <link rel="next" href="gslint-output.html#gslint-output" title="gslint output">
  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="gslint-input-parameters"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="gslint-output.html#gslint-output">gslint output</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="gslint.html#gslint">gslint</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="gslint.html#gslint">gslint</a>
  32. <hr>
  33. </div>
  34. <h4 class="subsection">D.7.1 <code>gslint</code> input parameters</h4>
  35. <p>The library functions <code>qng</code> and <code>qagx</code> take an
  36. argument of the form <code>(</code><var>f</var><code>,(</code><var>a</var><code>,</code><var>b</var><code>))</code>, where <var>f</var>
  37. is a function to be integrated, <var>a</var> is the lower limit, and
  38. <var>b</var> is the upper limit, both limits being floating point numbers
  39. as in <a href="math.html#math">math</a>.
  40. <p>The <code>qng_tol</code> and <code>qagx_tol</code> functions take an argument of
  41. <a name="index-tolerance-727"></a>the form <code>((</code><var>f</var><code>,</code><var>t</var><code>),(</code><var>a</var><code>,</code><var>b</var><code>))</code>, where <var>f</var>,
  42. <var>a</var>, and <var>b</var> are as above, and <var>t</var> is a specified
  43. tolerance.
  44. <p>The <code>qagp</code> and <code>qagp_tol</code> functions take arguments of
  45. the form <code>(</code><var>f</var><code>,</code><var>p</var><code>)</code> and
  46. <code>((</code><var>f</var><code>,</code><var>t</var><code>),</code><var>p</var><code>)</code>, respectively, where <var>f</var> and
  47. <var>t</var> are as above, and <var>p</var> is an ordered list of real numbers
  48. specifying the limits of integration along with arbitrarily many
  49. intervening breakpoints.
  50. <p>The integrand <var>f</var> is expressed in virtual machine code, and takes a
  51. single real argument to a real result. The argument and result of
  52. <var>f</var> are required to be floating point numbers as described in
  53. <a href="math.html#math">math</a>. Any expressible function of this type is acceptable, even
  54. one defined in terms of other integrals, so that a double or triple
  55. integral can be expressed easily, albeit a costly computation.
  56. However, a constant overhead in stack space is required for each
  57. nested library function call, and there is currently no mechanism to
  58. <a name="index-segmentation-fault-728"></a>prevent segmentation faults due to a stack overflow.
  59. <p>When no tolerance is specified, as with <code>qng</code>, <code>qagx</code>, and
  60. <code>qagp</code>, the tightest attainable tolerance is chosen by default,
  61. currently <code>2e-14</code>, in order find the most accurate result
  62. possible. A selection of progressively looser tolerances is tried
  63. automatically if the tightest one is not successful, stopping when
  64. either a solution is found or ten orders of magnitude are covered.
  65. <p>If a tolerance is explicitly specified, as with <code>qng_tol</code>,
  66. <code>qagx_tol</code> or <code>qagp_tol</code>, only that tolerance is tried.
  67. </body></html>