Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

101 lines
3.9KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <title>erf (LIBM)</title>
  7. <meta name="description" content="erf (LIBM)">
  8. <meta name="keywords" content="erf (LIBM)">
  9. <meta name="resource-type" content="document">
  10. <meta name="distribution" content="global">
  11. <meta name="Generator" content="makeinfo">
  12. <link href="index.html#Top" rel="start" title="Top">
  13. <link href="Document-Index.html#Document-Index" rel="index" title="Document Index">
  14. <link href="Document-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
  15. <link href="Math.html#Math" rel="up" title="Math">
  16. <link href="exp.html#exp" rel="next" title="exp">
  17. <link href="cosh.html#cosh" rel="prev" title="cosh">
  18. <style type="text/css">
  19. <!--
  20. a.summary-letter {text-decoration: none}
  21. blockquote.indentedblock {margin-right: 0em}
  22. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  23. blockquote.smallquotation {font-size: smaller}
  24. div.display {margin-left: 3.2em}
  25. div.example {margin-left: 3.2em}
  26. div.lisp {margin-left: 3.2em}
  27. div.smalldisplay {margin-left: 3.2em}
  28. div.smallexample {margin-left: 3.2em}
  29. div.smalllisp {margin-left: 3.2em}
  30. kbd {font-style: oblique}
  31. pre.display {font-family: inherit}
  32. pre.format {font-family: inherit}
  33. pre.menu-comment {font-family: serif}
  34. pre.menu-preformatted {font-family: serif}
  35. pre.smalldisplay {font-family: inherit; font-size: smaller}
  36. pre.smallexample {font-size: smaller}
  37. pre.smallformat {font-family: inherit; font-size: smaller}
  38. pre.smalllisp {font-size: smaller}
  39. span.nolinebreak {white-space: nowrap}
  40. span.roman {font-family: initial; font-weight: normal}
  41. span.sansserif {font-family: sans-serif; font-weight: normal}
  42. ul.no-bullet {list-style: none}
  43. -->
  44. </style>
  45. </head>
  46. <body lang="en">
  47. <a name="erf"></a>
  48. <div class="header">
  49. <p>
  50. Next: <a href="exp.html#exp" accesskey="n" rel="next">exp</a>, Previous: <a href="cosh.html#cosh" accesskey="p" rel="prev">cosh</a>, Up: <a href="Math.html#Math" accesskey="u" rel="up">Math</a> &nbsp; [<a href="Document-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Document-Index.html#Document-Index" title="Index" rel="index">Index</a>]</p>
  51. </div>
  52. <hr>
  53. <a name="erf_002c-erff_002c-erfc_002c-erfcf_002d_002d_002derror-function"></a>
  54. <h3 class="section">1.14 <code>erf</code>, <code>erff</code>, <code>erfc</code>, <code>erfcf</code>&mdash;error function</h3>
  55. <a name="index-erf"></a>
  56. <a name="index-erff"></a>
  57. <a name="index-erfc"></a>
  58. <a name="index-erfcf"></a>
  59. <p><strong>Synopsis</strong>
  60. </p><div class="example">
  61. <pre class="example">#include &lt;math.h&gt;
  62. double erf(double <var>x</var>);
  63. float erff(float <var>x</var>);
  64. double erfc(double <var>x</var>);
  65. float erfcf(float <var>x</var>);
  66. </pre></div>
  67. <p><strong>Description</strong><br>
  68. <code>erf</code> calculates an approximation to the &ldquo;error function&rdquo;,
  69. which estimates the probability that an observation will fall within
  70. <var>x</var> standard deviations of the mean (assuming a normal
  71. distribution).
  72. </p>
  73. <p><code>erfc</code> calculates the complementary probability; that is,
  74. <code>erfc(<var>x</var>)</code> is <code>1 - erf(<var>x</var>)</code>. <code>erfc</code> is computed directly,
  75. so that you can use it to avoid the loss of precision that would
  76. result from subtracting large probabilities (on large <var>x</var>) from 1.
  77. </p>
  78. <p><code>erff</code> and <code>erfcf</code> differ from <code>erf</code> and <code>erfc</code> only in the
  79. argument and result types.
  80. </p>
  81. <br>
  82. <p><strong>Returns</strong><br>
  83. For positive arguments, <code>erf</code> and all its variants return a
  84. probability&mdash;a number between 0 and 1.
  85. </p>
  86. <br>
  87. <p><strong>Portability</strong><br>
  88. None of the variants of <code>erf</code> are ANSI C.
  89. </p>
  90. <br>
  91. </body>
  92. </html>