diff liboctave/lo-specfun.cc @ 14771:10ed11922f19

maint: code cleanup for new erfcinv function. * NEWS: Place erfcinv alphabetically in list of new functions. * contributors.in: Add Axel Mathéi to list of contributors. * lo-specfun.cc: Adjust spacing to use Octave code conventions. * mappers.cc: Use eps ("single") rather than 1e-8 in assert tests. Re-arrange See Also links in docstring.
author Rik <octave@nomad.inbox5.com>
date Thu, 14 Jun 2012 21:34:39 -0700
parents cb85e836d035
children e190f6da40f6
line wrap: on
line diff
--- a/liboctave/lo-specfun.cc	Thu Jun 14 23:31:59 2012 +0200
+++ b/liboctave/lo-specfun.cc	Thu Jun 14 21:34:39 2012 -0700
@@ -3240,7 +3240,7 @@
     {  7.784695709041462e-03,  3.224671290700398e-01,
        2.445134137142996e+00,  3.754408661907416e+00 };
 
-  static const double spi2 =  8.862269254527579e-01; // sqrt(pi)/2.
+  static const double spi2 = 8.862269254527579e-01; // sqrt(pi)/2.
   static const double pi = 3.14159265358979323846;
   static const double pbreak = 0.95150;
   double y;
@@ -3274,7 +3274,7 @@
   if (refine)
     {
       // One iteration of Halley's method gives full precision.
-      double u = (erf(y) - (1-x)) * spi2 * exp (y*y);
+      double u = (erf (y) - (1-x)) * spi2 * exp (y*y);
       y -= u / (1 + y*u);
     }