bugGNU Octave - Bugs: bug #51963, test normpdf fails after...


bug #51963: test normpdf fails after __opengl_info__ using fltk on Intel graphics on Windows

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Fri 08 Sep 2017 09:22:45 AM UTC  
Category:  Plotting with OpenGL Severity:  2 - Minor
Priority:  3 - Low Item Group:  Inaccurate Result
Status:  None Assigned to:  None
Originator Name:  Avinoam Open/Closed:  Open
Release:  dev Operating System:  Microsoft Windows

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Sat 09 Sep 2017 04:58:01 PM UTC, comment #6:

OK, thanks. I'll let JWE consider what the power operator (^) translates to in terms of library verses low-level CPU instructions. If I had to guess, I'd say that Intel graphics plus Intel CPU means that the designers of the former knew a bit more under the hood and altered some math unit configuration that affected the last bit of a math operation, e.g., co-processor or something. The solution will probably boil down to allowing a bit of tolerance in this test.

Dan Sebald <sebald>
Sat 09 Sep 2017 03:06:19 PM UTC, comment #5:

The problem is here:

This is 64 bit windows binary

Avinoam Kalma <avinoam>
Project Member
Sat 09 Sep 2017 03:05:27 AM UTC, comment #4:

It this for 32 or 64 bit windows binary?


Dmitri A. Sergatskov <dasergatskov>
Sat 09 Sep 2017 01:37:59 AM UTC, comment #3:

OK, so it's not sqrt() or exp() that is changing.

I think I see the difference in formulas. It's in stdnormal_pdf.m where the PDF values are computed. In that routine, the formula is

while in the test in normpdf.m the formula for the comparison is

So, my guess would be something with division then. But let's try them all again. What result do you see for this:

Dan Sebald <sebald>
Fri 08 Sep 2017 10:12:57 PM UTC, comment #2:

Checking the script from comment #1

Avinoam Kalma <avinoam>
Project Member
Fri 08 Sep 2017 06:11:26 PM UTC, comment #1:

Your example error looks to be of the tolerance variety, i.e., the answer is correct but it is numerical precision that differs:

Abs err 5.5511e-017 exceeds tol 0

Rik might have more insight as to why a tolerance of 0 works here. I assume that if one follows the normpdf function all the way through it will come back to the

y = 1/sqrt(2*pi)*exp (-(x-1).^2/2)

formula. However, it's odd that after you launch Intel graphics driver support, then the tolerance fails. Could it be that the Intel driver is taking over some of the numerical library routines for exponentiation? I.e., that somehow the above expression for y as an Octave command is using the numerical library yet when the above expression is evaluated via normpdf it is using some Intel library?

Could you try something like:

to narrow down if maybe it is the sqrt() or exp() routine that changes? Or any other sequence you can think of that might be useful.

It sure is odd that only FLTK causes this whereas Qt toolkit works.

Dan Sebald <sebald>
Fri 08 Sep 2017 09:22:45 AM UTC, original submission:

I see this failure in Machine with Intel Graphics card, but not on another machine with another card.

Avinoam Kalma <avinoam>
Project Member


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

Attach Files:

No files currently attached


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 sebald (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by avinoam (Submitted the item)
  • -email is unavailable- added by avinoam

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-09-08 avinoam Releaseother => dev
    2017-09-08 mtmiller Severity3 - Normal => 2 - Minor
        Priority5 - Normal => 3 - Low
        Item GroupRegression => Inaccurate Result
        Summary[Windows] test normpdf fails after test _opengl_info_ using fltk => test normpdf fails after _opengl_info_ using fltk on Intel graphics on Windows
    2017-09-08 avinoam Carbon-Copy- => Added -email is unavailable-

    Back to the top

    Powered by Savane 3.3