History log of /seL4-test-master/projects/musllibc/src/math/__rem_pio2l.c
Revision Date Author Comments
# 0ce946cf 28-Oct-2014 Szabolcs Nagy <nsz@port70.net>

math: use the rounding idiom consistently

the idiomatic rounding of x is

n = x + toint - toint;

where toint is either 1/EPSILON (x is non-negative) or 1.5/EPSILON
(x may be negative and nearest rounding mode is assumed) and EPSILON is
according to the evaluation precision (the type of toint is not very
important, because single precision float can represent the 1/EPSILON of
ieee binary128).

in case of FLT_EVAL_METHOD!=0 this avoids a useless store to double or
float precision, and the long double code became cleaner with
1/LDBL_EPSILON instead of ifdefs for toint.

__rem_pio2f and __rem_pio2 functions slightly changed semantics:
on i386 a double-rounding is avoided so close to half-way cases may
get evaluated differently eg. as sin(pi/4-eps) instead of cos(pi/4+eps)


# ea9bb95a 03-Sep-2013 Szabolcs Nagy <nsz@port70.net>

math: long double trigonometric cleanup (cosl, sinl, sincosl, tanl)

ld128 support was added to internal kernel functions (__cosl, __sinl,
__tanl, __rem_pio2l) from freebsd (not tested, but should be a good
start for when ld128 arch arrives)

__rem_pio2l had some code cleanup, the freebsd ld128 code seems to
gather the results of a large reduction with precision loss (fixed
the bug but a todo comment was added for later investigation)

the old copyright was removed from the non-kernel wrapper functions
(cosl, sinl, sincosl, tanl) since these are trivial and the interesting
parts and comments had been already rewritten.


# 0cbb6547 19-Mar-2012 nsz <nsz@port70.net>

code cleanup of named constants

zero, one, two, half are replaced by const literals
The policy was to use the f suffix for float consts (1.0f),
but don't use suffix for long double consts (these consts
can be exactly represented as double).


# 2e8c8fbe 19-Mar-2012 nsz <nsz@port70.net>

don't inline __rem_pio2l so the code size is smaller