diff liboctave/LSODE.h @ 3945:b050da7f9994

[project @ 2002-05-20 19:40:07 by jwe]
author jwe
date Mon, 20 May 2002 19:40:07 +0000
parents 0486f50a8ecb
children 945e8c160191
line wrap: on
line diff
--- a/liboctave/LSODE.h	Sat May 18 00:05:08 2002 +0000
+++ b/liboctave/LSODE.h	Mon May 20 19:40:07 2002 +0000
@@ -53,11 +53,12 @@
 
   void init (void)
     {
-      x_absolute_tolerance = DBL_EPSILON * DBL_EPSILON;
+      double sqrt_eps = ::sqrt (DBL_EPSILON);
+      x_absolute_tolerance = sqrt_eps;
       x_initial_step_size = -1.0;
       x_maximum_step_size = -1.0;
       x_minimum_step_size = 0.0;
-      x_relative_tolerance = ::sqrt (DBL_EPSILON);
+      x_relative_tolerance = sqrt_eps;
 
       // This is consistent with earlier versions of Octave, and is
       // much larger than the default of 500 specified in the LSODE
@@ -79,7 +80,7 @@
   void set_default_options (void) { init (); }
 
   void set_absolute_tolerance (double val)
-    { x_absolute_tolerance = (val > 0.0) ? val : DBL_EPSILON * DBL_EPSILON; }
+    { x_absolute_tolerance = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); }
 
   void set_initial_step_size (double val)
     { x_initial_step_size = (val >= 0.0) ? val : -1.0; }