36 {
"absolute tolerance",
37 {
"absolute",
"tolerance", 0, 0, 0, },
38 { 1, 0, 0, 0, 0, }, 1, },
40 {
"relative tolerance",
41 {
"relative",
"tolerance", 0, 0, 0, },
42 { 1, 0, 0, 0, 0, }, 1, },
44 {
"single precision absolute tolerance",
45 {
"single",
"precision",
"absolute",
"tolerance", 0, },
46 { 1, 1, 1, 0, 0, }, 3, },
48 {
"single precision relative tolerance",
49 {
"single",
"precision",
"relative",
"tolerance", 0, },
50 { 1, 1, 1, 0, 0, }, 3, },
56 std::ostringstream buf;
59 <<
"Options for Quad include:\n\n"
61 <<
" ------- -----\n";
122 keyword, list[0].min_toks_to_match,
MAX_TOKENS))
130 keyword, list[1].min_toks_to_match,
MAX_TOKENS))
138 keyword, list[2].min_toks_to_match,
MAX_TOKENS))
146 keyword, list[3].min_toks_to_match,
MAX_TOKENS))
155 warning (
"quad_options: no match for `%s'", keyword.c_str ());
167 keyword, list[0].min_toks_to_match,
MAX_TOKENS))
174 keyword, list[1].min_toks_to_match,
MAX_TOKENS))
181 keyword, list[2].min_toks_to_match,
MAX_TOKENS))
188 keyword, list[3].min_toks_to_match,
MAX_TOKENS))
196 warning (
"quad_options: no match for `%s'", keyword.c_str ());
202 DEFUN (quad_options, args, ,
204 @deftypefn {Built-in Function} {} quad_options ()\n\
205 @deftypefnx {Built-in Function} {val =} quad_options (@var{opt})\n\
206 @deftypefnx {Built-in Function} {} quad_options (@var{opt}, @var{val})\n\
207 Query or set options for the function @code{quad}.\n\
208 When called with no arguments, the names of all available options and\n\
209 their current values are displayed.\n\
210 Given one argument, return the value of the corresponding option.\n\
211 When called with two arguments, @code{quad_options} set the option\n\
212 @var{opt} to value @var{val}.\n\
217 @item @qcode{\"absolute tolerance\"}\n\
218 Absolute tolerance; may be zero for pure relative error test.\n\
220 @item @qcode{\"relative tolerance\"}\n\
221 Non-negative relative tolerance. If the absolute tolerance is zero,\n\
222 the relative tolerance must be greater than or equal to\n\
223 @w{@code{max (50*eps, 0.5e-28)}}.\n\
225 @item @qcode{\"single precision absolute tolerance\"}\n\
226 Absolute tolerance for single precision; may be zero for pure relative\n\
229 @item @qcode{\"single precision relative tolerance\"}\n\
230 Non-negative relative tolerance for single precision. If the absolute\n\
231 tolerance is zero, the relative tolerance must be greater than or equal to\n\
232 @w{@code{max (50*eps, 0.5e-28)}}.\n\
238 int nargin = args.
length ();
244 else if (nargin == 1 || nargin == 2)
246 std::string keyword = args(0).string_value ();
256 error (
"quad_options: expecting keyword as first argument");