comparison liboctave/DASSL.h @ 3896:0486f50a8ecb

[project @ 2002-04-11 06:37:11 by jwe]
author jwe
date Thu, 11 Apr 2002 06:37:11 +0000
parents 957d7d6ab0e0
children cdfbc6678c23
comparison
equal deleted inserted replaced
3895:d38c7538b954 3896:0486f50a8ecb
51 51
52 ~DASSL_options (void) { } 52 ~DASSL_options (void) { }
53 53
54 void init (void) 54 void init (void)
55 { 55 {
56 double sqrt_eps = sqrt (DBL_EPSILON); 56 x_absolute_tolerance = DBL_EPSILON * DBL_EPSILON;
57 x_absolute_tolerance = sqrt_eps;
58 x_initial_step_size = -1.0; 57 x_initial_step_size = -1.0;
59 x_maximum_step_size = -1.0; 58 x_maximum_step_size = -1.0;
60 x_minimum_step_size = 0.0; 59 x_minimum_step_size = 0.0;
61 x_relative_tolerance = sqrt_eps; 60 x_relative_tolerance = sqrt (DBL_EPSILON);
62 } 61 }
63 62
64 void copy (const DASSL_options& opt) 63 void copy (const DASSL_options& opt)
65 { 64 {
66 x_absolute_tolerance = opt.x_absolute_tolerance; 65 x_absolute_tolerance = opt.x_absolute_tolerance;
71 } 70 }
72 71
73 void set_default_options (void) { init (); } 72 void set_default_options (void) { init (); }
74 73
75 void set_absolute_tolerance (double val) 74 void set_absolute_tolerance (double val)
76 { x_absolute_tolerance = (val > 0.0) ? val : ::sqrt (DBL_EPSILON); } 75 { x_absolute_tolerance = (val > 0.0) ? val : DBL_EPSILON * DBL_EPSILON; }
77 76
78 void set_initial_step_size (double val) 77 void set_initial_step_size (double val)
79 { x_initial_step_size = (val >= 0.0) ? val : -1.0; } 78 { x_initial_step_size = (val >= 0.0) ? val : -1.0; }
80 79
81 void set_maximum_step_size (double val) 80 void set_maximum_step_size (double val)