libm icon indicating copy to clipboard operation
libm copied to clipboard

port newlib's asinf

Open japaric opened this issue 7 years ago • 4 comments

Source: https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libm/mathfp/sf_asine.c;hb=HEAD

Rationale: the current implementation makes use of f64 and it has bad performance on architectures that have no hardware support for double precision floats.

What needs to be done:

  • Move the existing MUSL port into a private math::musl module and make sure we continue compiling it.
  • Port the newlib version into src/math/$fun.rs
  • Update the test suite by uncommenting the function name in tests/newlib.rs and removing the function name from tests/musl.rs.

japaric avatar Jul 27 '18 05:07 japaric

#141

burrbull avatar Jul 30 '18 18:07 burrbull

newlib's asinf is using f64 on line 66

       y = -2 * sqrt (g); <-- sqrt is f64->f64

m1el avatar Aug 26 '18 13:08 m1el

You are right.

burrbull avatar Aug 26 '18 14:08 burrbull

I wonder whether it is intentional.

vks avatar Aug 27 '18 08:08 vks