1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include <math.h>
- #include "math_private.h"
- #if defined(__UCLIBC_HAS_FENV__)
- #include <errno.h>
- #endif
- #if !defined __NO_LONG_DOUBLE_MATH
- long double
- atan2l (long double y, long double x)
- {
- # if defined(__UCLIBC_HAS_FENV__)
- long double z;
- if (__builtin_expect (x == 0.0L && y == 0.0L, 0) && _LIB_VERSION == _SVID_)
- return __kernel_standard_l (y, x, 203);
- z = (long double) __ieee754_atan2 ((double)y,(double) x);
- if (__builtin_expect (z == 0.0L && y != 0.0L && isfinite (x),0))
- __set_errno (ERANGE);
- return z;
- # else
- return (long double) __ieee754_atan2 ((double)y,(double) x);
- # endif
- }
- #endif
|