diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 23:14:53 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-09 23:14:53 +0100 |
| commit | 169daa11155988a210fac949297381743f3cb400 (patch) | |
| tree | 602ef5df5ae9ea075ab3d5dac3c8ad60da1ea2cc /lib/libm/exp2.c | |
| parent | 4e2112e165fdd94dee58378e3ea32892f3710cd7 (diff) | |
feat: clang-tidy fixes
Diffstat (limited to 'lib/libm/exp2.c')
| -rw-r--r-- | lib/libm/exp2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libm/exp2.c b/lib/libm/exp2.c index 1a4be99d..b94232fa 100644 --- a/lib/libm/exp2.c +++ b/lib/libm/exp2.c @@ -5,10 +5,11 @@ * SPDX-License-Identifier: MIT */ -#include <math.h> -#include <stdint.h> -#include "libm.h" -#include "exp_data.h" +#include "exp_data.h" // for __exp_data, exp_data, EXP_TABLE_BITS +#include "libm.h" // for eval_as_double, asuint64, asdouble, WANT_ROUNDING + +#include <math.h> // for double_t, INFINITY, exp2 +#include <stdint.h> // for uint64_t, uint32_t #define N (1 << EXP_TABLE_BITS) #define Shift __exp_data.exp2_shift @@ -88,7 +89,7 @@ double exp2(double x) return 1.0 + x; if (!(asuint64(x) >> 63)) return __math_oflow(0); - else if (asuint64(x) >= asuint64(-1075.0)) + if (asuint64(x) >= asuint64(-1075.0)) return __math_uflow(0); } if (2 * asuint64(x) > 2 * asuint64(928.0)) |
