123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #include <math.h>
- #include "math_private.h"
- #if !defined __NO_LONG_DOUBLE_MATH
- long double
- powl (long double x, long double y)
- {
- #if defined(__UCLIBC_HAS_FENV__)
- long double z = (long double) __ieee754_pow ((double) x, (double) y);
- if (__builtin_expect (!isfinite (z), 0))
- {
- if (_LIB_VERSION != _IEEE_)
- {
- if (isnan (x))
- {
- if (y == 0.0L)
-
- return __kernel_standard_l (x, y, 242);
- }
- else if (isfinite (x) && isfinite (y))
- {
- if (isnan (z))
-
- return __kernel_standard_l (x, y, 224);
- else if (x == 0.0L && y < 0.0L)
- {
- if (signbit (x) && signbit (z))
-
- return __kernel_standard_l (x, y, 223);
- else
-
- return __kernel_standard_l (x, y, 243);
- }
- else
-
- return __kernel_standard_l (x, y, 221);
- }
- }
- }
- else if (__builtin_expect (z == 0.0L, 0) && isfinite (x) && isfinite (y)
- && _LIB_VERSION != _IEEE_)
- {
- if (x == 0.0L)
- {
- if (y == 0.0L)
-
- return __kernel_standard_l (x, y, 220);
- }
- else
-
- return __kernel_standard_l (x, y, 222);
- }
- return z;
- # else
- return (long double) __ieee754_pow ((double) x, (double) y);
- # endif
- }
- #endif
|