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/sinf.c | |
| parent | 4e2112e165fdd94dee58378e3ea32892f3710cd7 (diff) | |
feat: clang-tidy fixes
Diffstat (limited to 'lib/libm/sinf.c')
| -rw-r--r-- | lib/libm/sinf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/libm/sinf.c b/lib/libm/sinf.c index f835ef8a..28513976 100644 --- a/lib/libm/sinf.c +++ b/lib/libm/sinf.c @@ -14,7 +14,10 @@ * ==================================================== */ -#include "libm.h" +#include "libm.h" // for __cosdf, __sindf, __rem_pio2f, FORCE_EVAL, GET_F... + +#include <math.h> // for M_PI_2, sinf +#include <stdint.h> // for uint32_t /* Small multiples of pi/2 rounded to double precision. */ static const double s1pio2 = 1 * M_PI_2, /* 0x3FF921FB, 0x54442D18 */ @@ -45,8 +48,7 @@ float sinf(float x) if (ix <= 0x4016cbe3) { /* |x| ~<= 3pi/4 */ if (sign) return -__cosdf(x + s1pio2); - else - return __cosdf(x - s1pio2); + return __cosdf(x - s1pio2); } return __sindf(sign ? -(x + s2pio2) : -(x - s2pio2)); } @@ -54,8 +56,7 @@ float sinf(float x) if (ix <= 0x40afeddf) { /* |x| ~<= 7*pi/4 */ if (sign) return __cosdf(x + s3pio2); - else - return -__cosdf(x - s3pio2); + return -__cosdf(x - s3pio2); } return __sindf(sign ? x + s4pio2 : x - s4pio2); } |
