Re: [q-lang-users] Q 7.2 RC1 Issue 3: IEEE floats
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-06-19 20:20:30
|
John Cowan wrote: > But none of "on inf", "-inf", or "nan" has the correct meaning input. > This should be cleaned up. I don't understand, what's "on inf"? Defining inf and nan as const variables in the library would probably do the trick. In fact, this is what I do (for inf) in some of my scripts. > 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). That's easy to fix. If I don't hear any objections, I'll do that tomorrow. > 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). Is there a portable way to check for inf and nan values? (So that I don't have to rely on the C library to do the right thing when printing those numbers.) -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |