7016
|
1 ## Copyright (C) 2007 John W. Eaton |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
|
18 |
5590
|
19 %% Automatically generated from DejaGNU files |
|
20 |
|
21 %% test/octave.test/quad/quad-1.m |
|
22 %!function y = f (x) |
|
23 %! y = x + 1; |
|
24 %!test |
|
25 %! [v, ier, nfun, err] = quad ("f", 0, 5); |
|
26 %! assert(ier == 0 && abs (v - 17.5) < sqrt (eps) && nfun > 0 && |
|
27 %! err < sqrt (eps)) |
|
28 |
|
29 %% test/octave.test/quad/quad-2.m |
|
30 %!function y = f (x) |
|
31 %! y = x .* sin (1 ./ x) .* sqrt (abs (1 - x)); |
|
32 %!test |
6543
|
33 %! [v, ier, nfun, err] = quad ("f", 0.001, 3); |
|
34 %! assert((ier == 0 || ier == 1) && abs (v - 1.98194120273598) < sqrt (eps) && nfun > 0); |
5590
|
35 |
|
36 %% test/octave.test/quad/quad-3.m |
5751
|
37 %!error <Invalid call to quad.*> quad (); |
5590
|
38 |
|
39 %% test/octave.test/quad/quad-4.m |
5751
|
40 %!error <Invalid call to quad.*> quad ("f", 1, 2, 3, 4, 5); |
5590
|
41 |
|
42 %% test/octave.test/quad/quad_options-1.m |
|
43 %!test |
|
44 %! quad_options ("absolute tolerance", eps); |
|
45 %! assert(quad_options ("absolute tolerance") == eps); |
|
46 |
|
47 %% test/octave.test/quad/quad_options-3.m |
5751
|
48 %!error <Invalid call to quad_options.*> quad_options (1, 2, 3); |
5590
|
49 |