Mercurial > hg > octave-lyh
changeset 3945:b050da7f9994
[project @ 2002-05-20 19:40:07 by jwe]
author | jwe |
---|---|
date | Mon, 20 May 2002 19:40:07 +0000 |
parents | 818f5aec1db5 |
children | eab957395758 |
files | liboctave/ChangeLog liboctave/DASPK.h liboctave/DASSL.h liboctave/LSODE.h |
diffstat | 4 files changed, 22 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,14 @@ +2002-05-20 John W. Eaton <jwe@bevo.che.wisc.edu> + + * DASSL.h (DASSL_options::init): Undo previous change. + (DASSL_options::set_absolute_tolerance): Likewise. + * LSODE.h (LSODE_options::init): Likewise. + (LSODE_options::set_absolute_tolerance): Likewise. + + * DASPK.h (DASPK_options::init): Use default absolute tolerance of + sqrt(eps), not eps^2. + DASPK_options::set_absolute_tolerance): Likewise. + 2002-05-17 Mumit Khan <khan@nanotech.wisc.edu> * Array.h (Array<T>::resize_fill_value): Return default initialized
--- 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; }
--- a/liboctave/DASSL.h +++ b/liboctave/DASSL.h @@ -53,11 +53,12 @@ void init (void) { - x_absolute_tolerance = sqrt (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 DASSL_options& opt)
--- a/liboctave/LSODE.h +++ b/liboctave/LSODE.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; // 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; }