[q-lang-users] Q 7.2 RC1 Issue 3: IEEE floats
Brought to you by:
agraef
From: John C. <co...@cc...> - 2006-06-19 19:07:25
|
Currently, Q floating-point operations do not conform to IEEE floats, even though that is the underlying implementation on all important machines. Specifically, the support for infinities and NaNs is deficient. Currently, the following expressions are evaluated as follows: ==> def pinf = 1.0e307 * 1.0e307 ==> def ninf = -pinf ==> pinf inf ==> ninf -inf ==> pinf + ninf nan But none of "on inf", "-inf", or "nan" has the correct meaning input. This should be cleaned up. Furthermore, currently an attempt to do a floating-point division by zero is made to fail, rather than returning the IEEE-appropriate results (negative or positive infinity, unless the numerator is also zero, in which case NaN). This should be cleaned up by defining a syntax for these values to be used on input and output, and by not failing when doing a floating division by zero (though an exact division by zero should still fail). -- Overhead, without any fuss, the stars were going out. --Arthur C. Clarke, "The Nine Billion Names of God" John Cowan <co...@cc...> |