This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]