comparison scripts/general/quadl.m @ 14068:6eeb9e8e63cf stable

quadl.m: Relax tolerance on %!test to pass on all platforms (Bug #33863) * quadl.m: Relax tolerance on %!test to pass on all platforms (Bug #33863)
author Rik <octave@nomad.inbox5.com>
date Sun, 18 Dec 2011 21:14:05 -0800
parents e81ddf9cacd5
children 72c96de7a403
comparison
equal deleted inserted replaced
14067:b2e9c4b0c4f8 14068:6eeb9e8e63cf
201 ## basic functionality 201 ## basic functionality
202 %!assert (quadl (@(x) sin (x), 0, pi, [], []), 2, -3e-16) 202 %!assert (quadl (@(x) sin (x), 0, pi, [], []), 2, -3e-16)
203 203
204 ## the values here are very high so it may be unavoidable that this fails 204 ## the values here are very high so it may be unavoidable that this fails
205 %!assert (quadl (@(x) sin (3*x).*cosh (x).*sinh (x),10,15), 205 %!assert (quadl (@(x) sin (3*x).*cosh (x).*sinh (x),10,15),
206 %! 2.588424538641647e+10, -9e-15) 206 %! 2.588424538641647e+10, -1.1e-14)
207 207
208 ## extra parameters 208 ## extra parameters
209 %!assert (quadl (@(x,a,b) sin (a + b*x), 0, 1, [], [], 2, 3), 209 %!assert (quadl (@(x,a,b) sin (a + b*x), 0, 1, [], [], 2, 3),
210 %! cos(2)/3 - cos(5)/3, - 3e-16) 210 %! cos(2)/3 - cos(5)/3, -3e-16)
211 211
212 ## test different tolerances. 212 ## test different tolerances.
213 %!assert (quadl (@(x) sin (2 + 3*x).^2, 0, 10, 0.3, []), 213 %!assert (quadl (@(x) sin (2 + 3*x).^2, 0, 10, 0.3, []),
214 %! (60 + sin(4) - sin(64))/12, -0.3) 214 %! (60 + sin(4) - sin(64))/12, -0.3)
215 %!assert (quadl (@(x) sin (2 + 3*x).^2, 0, 10, 0.1, []), 215 %!assert (quadl (@(x) sin (2 + 3*x).^2, 0, 10, 0.1, []),