Mercurial > hg > octave-lyh
diff liboctave/DASPK.h @ 3945:b050da7f9994
[project @ 2002-05-20 19:40:07 by jwe]
author | jwe |
---|---|
date | Mon, 20 May 2002 19:40:07 +0000 |
parents | f56cd411adb4 |
children | ee0304212be0 |
line wrap: on
line diff
--- a/liboctave/DASPK.h +++ b/liboctave/DASPK.h @@ -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; } void copy (const DASPK_options& opt) @@ -72,7 +73,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; }