Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
( Jump to the original submission )
Thanks, I pushed the test changes on the stable branch
https://hg.savannah.gnu.org/hgweb/octave/rev/f80e68529bbf
Mike, in cosint we have still an error in the order of 1e-15, so it seems reasonable to me. The same holds for the error reported by Dmitri
Here is a patch that fixes all of the specfun test failures for me on 32-bit i686 builds of Octave.
Michele - most of the tolerance changes I had to make seem reasonable. In betainc.m and betaincinv.m I had to roughly double tolerances on a few failing tests. In gammainc.m and sinint.m I had to increase a few test tolerances by only 1 or 2 eps.
The single test failure in cosint.m needed a tolerance increase of about 4.5x, does that seem like a problem to you or is it also reasonable?
(file #43656)
I posted this elsewhere, but may be this is more relevant place. I get a test failure on x86_64 compiled with -mfpmath=387
***** test x = linspace (0.1, 0.9, 11); a = [0.1:0.1:1]; [x,a,b] = ndgrid (x,a,a); xx = betaincinv (betainc (x, a, b, "upper"), a, b, "upper"); assert (xx, x, 3e-15); !!!!! test failed ASSERT errors for: assert (xx,x,3e-15) Location | Observed | Expected | Reason (6,1,1) 0.5 0.5 Abs err 4.3299e-15 exceeds tol 3e-15 by 1e-15
8b50eab9689e (stable) tip
Dmitri. --
Thank you, I will go through and increase the tolerances. In most cases it looks like either doubling or increasing by 1 eps will do.
Do you have any specific concerns about the gammainc test that has no tolerance, do you expect an exact answer there? Or did it just happen to be exact during your testing so you didn't need to add a tolerance?
Mike, I rewrote those function during my GSoC project. There is no particular mean for the tolerances in the tests, they were just the "most restrictive" I was able to find on my machine. For what I see, the errors you obtain are of the same magnitude so I think that the tests should simply be made less restrictive
In testing Octave built for i686, I am seeing 3 test failures in betainc.m, 1 test failure in cosint.m, 5 test failures in gammainc.m, and 2 test failures in sinint.m.
All of these test failures look like candidates for increasing the tolerances, if someone familiar with these functions can verify that this makes sense.
***** assert (betainc (0.0001, 20, 30), 2.819953178893307e-67, -3e-14); ASSERT errors for: assert (betainc (0.0001, 20, 30),2.819953178893307e-67,-3e-14) Location | Observed | Expected | Reason () 2.82e-67 2.82e-67 Rel err 6.7292e-14 exceeds tol 3e-14 by 4e-14 ***** assert (betainc (0.999, 20, 30, "upper"), 1.850806276141535e-77, -3e-14); !!!!! test failed ASSERT errors for: assert (betainc (0.999, 20, 30, "upper"),1.850806276141535e-77,-3e-14) Location | Observed | Expected | Reason () 1.8508e-77 1.8508e-77 Rel err 6.0715e-14 exceeds tol 3e-14 by 3e-14 ***** assert (betainc (0.5, 200, 300, "upper"), 3.54348026439253e-06, -1e-13); !!!!! test failed ASSERT errors for: assert (betainc (0.5, 200, 300, "upper"),3.54348026439253e-06,-1e-13) Location | Observed | Expected | Reason () 3.5435e-06 3.5435e-06 Rel err 2.0832e-13 exceeds tol 1e-13 by 1e-13 ***** assert (cosint (pi), 0.0736679120464254860, -2*eps) !!!!! test failed ASSERT errors for: assert (cosint (pi),0.0736679120464254860,-2 * eps) Location | Observed | Expected | Reason () 0.073668 0.073668 Rel err 1.6954e-15 exceeds tol 4.4409e-16 by 1e-15 ***** assert (gammainc ([3 2 36],[2 3 18], "upper"), ... [4/exp(3) 5*exp(-2) (4369755579265807723 / 2977975)/exp(36)]) !!!!! test failed ASSERT errors for: assert (gammainc ([3, 2, 36], [2, 3, 18], "upper"),[4 / exp(3), 5 * exp(-2), (4369755579265807723 Location | Observed | Expected | Reason (3) 0.00034036 0.00034036 Abs err 5.421e-20 exceeds tol 0 by 5e-20 ***** assert (gammainc (200, 200, "upper"), 0.49059658199276367497217454, -4*eps) !!!!! test failed ASSERT errors for: assert (gammainc (200, 200, "upper"),0.49059658199276367497217454,-4 * eps) Location | Observed | Expected | Reason () 0.4906 0.4906 Rel err 1.0184e-15 exceeds tol 8.8818e-16 by 1e-16 ***** assert (gammainc (200, 200), 0.509403418007236325027825459574527043, -3*eps) !!!!! test failed ASSERT errors for: assert (gammainc (200, 200),0.509403418007236325027825459574527043,-3 * eps) Location | Observed | Expected | Reason () 0.5094 0.5094 Rel err 1.0897e-15 exceeds tol 6.6613e-16 by 4e-16 ***** assert (gammainc (200, 200, "scaledupper"), 17.3984438553791505135122900, -eps) !!!!! test failed ASSERT errors for: assert (gammainc (200, 200, "scaledupper"),17.3984438553791505135122900,-eps) Location | Observed | Expected | Reason () 17.3984 17.3984 Rel err 4.0839e-16 exceeds tol 2.2204e-16 by 2e-16 ***** assert (gammainc (200, 200, "scaledlower"), 18.065406676779221643065, -6*eps) !!!!! test failed ASSERT errors for: assert (gammainc (200, 200, "scaledlower"),18.065406676779221643065,-6 * eps) Location | Observed | Expected | Reason () 18.0654 18.0654 Rel err 1.3766e-15 exceeds tol 1.3323e-15 by 4e-17 ***** assert (sinint (pi) , 1.851937051982466170361, -2*eps) !!!!! test failed ASSERT errors for: assert (sinint (pi),1.851937051982466170361,-2 * eps) Location | Observed | Expected | Reason () 1.8519 1.8519 Rel err 4.7959e-16 exceeds tol 4.4409e-16 by 4e-17 ***** assert (sinint (-pi), -1.851937051982466170361, -2*eps) !!!!! test failed ASSERT errors for: assert (sinint (-pi),-1.851937051982466170361,-2 * eps) Location | Observed | Expected | Reason () -1.8519 -1.8519 Rel err 4.7959e-16 exceeds tol 4.4409e-16 by 4e-17
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9