12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include <math.h>
- #include "math_private.h"
- #if defined(__UCLIBC_HAS_FENV__)
- #include <fenv.h>
- #endif
- double
- log (double x)
- {
- #if defined(__UCLIBC_HAS_FENV__)
- if (__builtin_expect (islessequal (x, 0.0), 0) && _LIB_VERSION != _IEEE_)
- {
- if (x == 0.0)
- {
- feraiseexcept (FE_DIVBYZERO);
- return __kernel_standard (x, x, 16);
- }
- else
- {
- feraiseexcept (FE_INVALID);
- return __kernel_standard (x, x, 17);
- }
- }
- #endif
- return __ieee754_log (x);
- }
- libm_hidden_def(log)
|