[Bug libc/17661] some invalid floating point values should be considered as "nan"

joseph at codesourcery dot com sourceware-bugzilla@sourceware.org
Fri Nov 28 18:30:00 GMT 2014


https://sourceware.org/bugzilla/show_bug.cgi?id=17661

--- Comment #8 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Essentially, I think it's a mistake for gnulib to do anything to try to 
handle such representations consistently.  If a program has a need to 
interpret arbitrary bit-patterns as floating-point values without crashing 
on any of them, it should pass them explicitly to an appropriate interface 
that checks or canonicalizes them, and gnulib could provide such an 
interface, but other functions should not attempt such special handling.

Such an interface is probably not TS 18661-1 canonicalizel, since the 
representations in question don't correspond to a value of the type and so 
don't have a corresponding canonical representation (although maybe that 
means canonicalizel should return failure on them).  And as iscanonical 
takes a value rather than a representation, it's not expected to do 
anything meaningful with trap representations either.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



More information about the Glibc-bugs mailing list