Mercurial > hg > octave-avbm
changeset 3896:0486f50a8ecb
[project @ 2002-04-11 06:37:11 by jwe]
author | jwe |
---|---|
date | Thu, 11 Apr 2002 06:37:11 +0000 |
parents | d38c7538b954 |
children | efa508da7d5c |
files | liboctave/ChangeLog liboctave/DASSL.h liboctave/LSODE.h |
diffstat | 3 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2002-04-11 John W. Eaton <jwe@bevo.che.wisc.edu> + + * DASSL.h (DASSL_options::init): Set absolute tolerance to eps ^ 2. + (DASSL_options::set_absolute_tolerance): Likewise. + * LSODE.h (LSODE_options::init): Likewise. + (LSODE_options::set_absolute_tolerance): Likewise. + 2002-04-03 Steven G. Johnson <stevenj@alum.mit.edu> * f2c-main.c (MAIN_, MAIN__): Delete. Use F77_DUMMY_MAIN instead.
--- a/liboctave/DASSL.h +++ b/liboctave/DASSL.h @@ -53,12 +53,11 @@ void init (void) { - double sqrt_eps = sqrt (DBL_EPSILON); - x_absolute_tolerance = sqrt_eps; + x_absolute_tolerance = DBL_EPSILON * DBL_EPSILON; x_initial_step_size = -1.0; x_maximum_step_size = -1.0; x_minimum_step_size = 0.0; - x_relative_tolerance = sqrt_eps; + x_relative_tolerance = sqrt (DBL_EPSILON); } void copy (const DASSL_options& opt) @@ -73,7 +72,7 @@ void set_default_options (void) { init (); } void set_absolute_tolerance (double val) - { x_absolute_tolerance = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); } + { x_absolute_tolerance = (val > 0.0) ? val : DBL_EPSILON * DBL_EPSILON; } void set_initial_step_size (double val) { x_initial_step_size = (val >= 0.0) ? val : -1.0; }
--- a/liboctave/LSODE.h +++ b/liboctave/LSODE.h @@ -53,13 +53,11 @@ void init (void) { - double sqrt_eps = ::sqrt (DBL_EPSILON); - - x_absolute_tolerance = sqrt_eps; + x_absolute_tolerance = DBL_EPSILON * DBL_EPSILON; x_initial_step_size = -1.0; x_maximum_step_size = -1.0; x_minimum_step_size = 0.0; - x_relative_tolerance = sqrt_eps; + x_relative_tolerance = ::sqrt (DBL_EPSILON); // This is consistent with earlier versions of Octave, and is // much larger than the default of 500 specified in the LSODE @@ -81,7 +79,7 @@ void set_default_options (void) { init (); } void set_absolute_tolerance (double val) - { x_absolute_tolerance = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); } + { x_absolute_tolerance = (val > 0.0) ? val : DBL_EPSILON * DBL_EPSILON; } void set_initial_step_size (double val) { x_initial_step_size = (val >= 0.0) ? val : -1.0; }