bugGNU Octave - Bugs: bug #53437, tests: betainc.m, cosint.m,...

 
 

bug #53437: tests: betainc.m, cosint.m, gammainc.m, sinint.m: 12 failing tests on i686

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 23 Mar 2018 06:43:58 AM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 26 Mar 2018 08:40:27 PM UTC, comment #6: 

Thanks, I pushed the test changes on the stable branch

https://hg.savannah.gnu.org/hgweb/octave/rev/f80e68529bbf

Mike Miller <mtmiller>
Group Member
Sat 24 Mar 2018 10:03:34 AM UTC, comment #5: 

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

Michele Ginesi <m_ginesi>
Fri 23 Mar 2018 10:11:39 PM UTC, comment #4: 

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)

Mike Miller <mtmiller>
Group Member
Fri 23 Mar 2018 05:32:52 PM UTC, comment #3: 

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.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 23 Mar 2018 04:26:45 PM UTC, comment #2: 

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 Miller <mtmiller>
Group Member
Fri 23 Mar 2018 11:30:05 AM UTC, comment #1: 

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

Michele Ginesi <m_ginesi>
Fri 23 Mar 2018 06:43:58 AM UTC, original submission:  

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


Mike Miller <mtmiller>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #43656:  bug53437.diff added by mtmiller (5KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by m_ginesi (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    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 group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-26 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2018-03-23 mtmiller Attached File- Added bug53437.diff, #43656
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code