February 05, 2012, 10:40:16 am
News: Welcome to NPL Community Forum.
Please let us know what you think, and let's get the other developers on here, so we can work together to move NPL to the next level.
Pages: [1]   Go Down
Print
Author Topic: Bug Notification  (Read 1005 times)
0 Members and 1 Guest are viewing this topic.
Mr. Niakwa
NPL
Administrator
*****
Offline Offline

Posts: 17


Beedy beedy beep.


View Profile WWW Email
« on: January 28, 2009, 03:41:25 pm »

Bug notification

We have uncovered a bug in NPL Release 5 runtimes for SuSE Linux and SCO Unix that affects trigonometric functions.

In this bug, an obscure series of calculations caused a value of -90 to be stored internally as (-90000000000000E-12), which is numerically the same as -90.  The math coprocessor code loads the value, and mistakenly detects the internal value as an underflow to zero, so it uses the value of  0 instead of -90 for the trig function. 

The bug doesn't affect Windows runtimes because a different method of testing for underflow is used. 

The bug can affect any of the trig functions but only when:
1) $OPTIONS byte 16 is HEX(01)
2) the trig function's argument is negative
3) the argument is stored internally with a negative exponent (e.g. -900E-1). 

The bug can be avoided completely by setting $OPTIONS byte 16 to HEX(00), which is the default.
Logged

NPL Support                                      If a man speaks in the forest and there is no woman around to hear him....Is he still wrong?
Pages: [1]   Go Up
Print
Jump to: