[Bug 1001539] Single precision floating point math library
[email protected] Sat, 08 Jun 2013 19:04:31 +0000
| Newsgroups | gmane.os.ecos.patches |
|---|---|
| Message-ID | <[email protected]/> |
Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001539 --- Comment #30 from Jonathan Larmour <[email protected]> --- (In reply to comment #29) > > I'm referring to actual code Ref:float/ieee754_api/wf_asinf.c > if (|x| > 1) POSIX mode sets errno = EDOM indeed, but returns 0 rather than > NaN. It's not required to return NaN. In fact the slightly older POSIX standard I've got here (not online) says that more explicitly: "If the value of x is not in the range [−1,1], and is not ±Inf or NaN, either 0.0 or NaN shall be returned and errno shall be set to [EDOM]. If x is NaN, NaN shall be returned and errno may be set to [EDOM]. If x is ±Inf, either 0.0 shall be returned and errno set to [EDOM], or NaN shall be returned and errno may be set to [EDOM]." I assume in the more recent standard they decided to make it more general - not necessarily 0.0 but any value as long as it's implementation-defined. But that can certainly be 0.0. -- You are receiving this mail because: You are on the CC list for the bug.