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: Thu, 22 Mar 2012 23:52:55 +0000
- Subject: [Bug 1001539] Single precision floating point math library
- Auto-submitted: auto-generated
- References: <bug-1001539-104@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001539
--- Comment #21 from Ilija Kocho <ilijak@siva.com.mk> 2012-03-22 23:52:49 GMT ---
(In reply to comment #20)
> (In reply to comment #19)
> > > Tests expect NaN for out-of-domain arguments, but functions return
> > > something else. For instance asinf(10) returns 0. Here is a little
> > > example:
> >
> > IMO, it can depend on libm compatibility, look at libm compat.
> > wrappers (w_*.c), e.g. at w_asin{,f}.c. Though, I think in our case
> > it should be a result of call __ieee754_asin{,f}(). And if libm
> > compat mode is not IEEE? I'm looking at misc/standard.c
> > (__kernel_standard)...
>
> Well, I understand what is wrong. Let's take `wf_asin.c', "i wonder"
> hack:
>
> --- a/packages/language/c/libm/current/src/float/ieee754-api/wf_asin.c
> +++ b/packages/language/c/libm/current/src/float/ieee754-api/wf_asin.c
> @@ -88,8 +88,10 @@
> #ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
> return __ieee754_asinf(x);
> #else
> - double z;
> + float z;
> z = __ieee754_asinf(x);
> + printf("__ieee754_asinf(%f)=%f\n", x, z);
> + return z;
> if(cyg_libm_get_compat_mode() == CYGNUM_LIBM_COMPAT_IEEE || isnanf(x))
>
[snip]
> FYI, import
>
> cdl_option CYGSEM_LIBM_COMPAT_IEEE_ONLY {
> user_value 1
> };
>
> breaks build of single precision tests. Some your headers have EDOM
> used, but this value is not defined for such config conditions. Perhaps,
> you need weak definition for that in `vector_support_float.h' header.
>
> // Not tested
> #ifdef CYGSEM_LIBM_COMPAT_IEEE_ONLY
> # ifndef EDOM
> # define EDOM 33
> # endif
> #endif
>
> Sergei
Thank you for bringing this up Sergei.
Now I am considering exclusion of EDOM cases from test
for modes other than CYGSEM_LIBM_COMPAT_IEEE_ONLY. (tests/asin.h doesn't have
them at all).
Ilija
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.