This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
[Bug 1001539] Single precision floating point math library
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-patches at ecos dot sourceware dot org
- Date: Sat, 08 Jun 2013 19:04:31 +0000
- Subject: [Bug 1001539] Single precision floating point math library
- Auto-submitted: auto-generated
- References: <bug-1001539-104 at http dot bugs dot ecos dot sourceware dot org/>
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 <jifl@ecoscentric.com> ---
(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.