SV: Non reentrant floating point functions?
Rasmus Bo Sørensen
rboso@dtu.dk
Fri Mar 13 14:07:00 GMT 2015
Hi Eric
Thank you for the quick reply.
> Any math function which is required to set errno on failure is not
> necessarily reentrant (or rather, _REENT_ONLY is designed to protect
> setups where errno is global rather than thread-local).
Looking into the reentrant and the non-reentrant functions in math.h,
I cannot see the different in how errno is set for the 'tan' function
(newlib/libm/mathfp/s_tan.c, which is reentrant) and the 'atan2' function
(newlib/libm/mathfp/s_atan2.c -> s_atangent.c, which is non-reentrant).
Maybe I am missing something?
Best regards,
Rasmus
More information about the Newlib
mailing list