This is the mail archive of the mailing list for the eCos 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 1001539] Single precision floating point math library

Please do not reply to this email. Use the web interface provided at:

--- Comment #20 from Sergei Gavrikov <> 2012-03-22 18:05:34 GMT ---
(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"

  --- 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 @@
       return __ieee754_asinf(x);
  -    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))
return z;
       if(fabs(x)>1.0) {
           return __kernel_standard(x,x,2); /* asin(|x|>1) */

Then let's run `asinf' (a picture worth more than many words)

  INFO:<Still crunching, please wait...>
  INFO:<Still crunching, please wait...>
  PASS:<asinf() is stable>
  EXIT:<Finished tests from testcase
for Math library asinf() function>

Thus, IMHO, you have to implement own __kernel_standard_float() and
maybe another "float" wrappers to peace failed f-tests.

FYI, import

      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
   # ifndef EDOM
   #  define EDOM 33
   # endif


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

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