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\
209 When called with no arguments, the names of all available options and\n\
210 their current values are displayed.\n\
212 Given one argument, return the value of the option @var{opt}.\n\
214 When called with two arguments, @code{quad_options} sets the option\n\
215 @var{opt} to value @var{val}.\n\
220 @item @qcode{\"absolute tolerance\"}\n\
221 Absolute tolerance; may be zero for pure relative error test.\n\
223 @item @qcode{\"relative tolerance\"}\n\
224 Non-negative relative tolerance. If the absolute tolerance is zero,\n\
225 the relative tolerance must be greater than or equal to\n\
226 @w{@code{max (50*eps, 0.5e-28)}}.\n\
228 @item @qcode{\"single precision absolute tolerance\"}\n\
229 Absolute tolerance for single precision; may be zero for pure relative\n\
232 @item @qcode{\"single precision relative tolerance\"}\n\
233 Non-negative relative tolerance for single precision. If the absolute\n\
234 tolerance is zero, the relative tolerance must be greater than or equal to\n\
235 @w{@code{max (50*eps, 0.5e-28)}}.\n\
241 int nargin = args.
length ();
247 else if (nargin == 1 || nargin == 2)
249 std::string keyword = args(0).string_value ();
259 error (
"quad_options: expecting keyword as first argument");
void set_single_precision_relative_tolerance(float val)
OCTINTERP_API void print_usage(void)
float single_precision_absolute_tolerance(void) const
void set_relative_tolerance(double val)
octave_idx_type length(void) const
static Quad_options_struct Quad_options_table[]
static octave_value_list show_Quad_options(const std::string &keyword)
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
float float_value(bool frc_str_conv=false) const
static Quad_options quad_opts
static void print_Quad_options(std::ostream &os)
void set_single_precision_absolute_tolerance(float val)
static void set_Quad_options(const std::string &keyword, const octave_value &val)
float single_precision_relative_tolerance(void) const
int keyword_almost_match(const char *const *std, int *min_len, const std::string &s, int min_toks_to_match, int max_toks)
void warning(const char *fmt,...)
void set_absolute_tolerance(double val)
double relative_tolerance(void) const
double absolute_tolerance(void) const
double double_value(bool frc_str_conv=false) const