summaryrefslogtreecommitdiff
path: root/lib/libm/__cosl.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-25 19:24:38 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-25 20:35:03 +0100
commita984eb367c032dbe2577f01238c3d1268526be70 (patch)
tree437fef40379b2758b129ccea39df3570fa2d145e /lib/libm/__cosl.c
parent8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff)
Clang-tidy fixes
Diffstat (limited to 'lib/libm/__cosl.c')
-rw-r--r--lib/libm/__cosl.c40
1 files changed, 13 insertions, 27 deletions
diff --git a/lib/libm/__cosl.c b/lib/libm/__cosl.c
index 18858e6b..89978d9a 100644
--- a/lib/libm/__cosl.c
+++ b/lib/libm/__cosl.c
@@ -44,21 +44,15 @@
* almost for free from the complications needed to search for the best
* higher coefficients.
*/
-static const long double C1 =
- 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68
- */
-static const double C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */
- C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */
- C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */
- C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */
- C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
- C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
-#define POLY(z) \
- ((z) * \
- (C1 + \
- (z) * (C2 + \
- (z) * (C3 + \
- (z) * (C4 + (z) * (C5 + (z) * (C6 + (z) * C7)))))))
+static const long double C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68
+ */
+static const double C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */
+ C3 = 0.000024801587301571716, /* 0x1a01a01a018e22.0p-68 */
+ C4 = -0.00000027557319215507120, /* -0x127e4fb7602f22.0p-74 */
+ C5 = 0.0000000020876754400407278, /* 0x11eed8caaeccf1.0p-81 */
+ C6 = -1.1470297442401303e-11, /* -0x19393412bd1529.0p-89 */
+ C7 = 4.7383039476436467e-14; /* 0x1aac9d9af5c43e.0p-97 */
+#define POLY(z) ((z) * (C1 + (z) * (C2 + (z) * (C3 + (z) * (C4 + (z) * (C5 + (z) * (C6 + (z) * C7)))))))
#elif LDBL_MANT_DIG == 113
/*
* ld128 version of __cos.c. See __cos.c for most comments.
@@ -83,18 +77,10 @@ static const double C8 = -0.1561920696721507929516718307820958119868e-15,
C9 = 0.4110317413744594971475941557607804508039e-18,
C10 = -0.8896592467191938803288521958313920156409e-21,
C11 = 0.1601061435794535138244346256065192782581e-23;
-#define POLY(z) \
- (z * \
- (C1 + \
- z * (C2 + \
- z * (C3 + \
- z * (C4 + \
- z * (C5 + \
- z * (C6 + \
- z * (C7 + \
- z * (C8 + \
- z * (C9 + z * (C10 + \
- z * C11)))))))))))
+#define POLY(z) \
+ (z * (C1 + \
+ z * (C2 + \
+ z * (C3 + z * (C4 + z * (C5 + z * (C6 + z * (C7 + z * (C8 + z * (C9 + z * (C10 + z * C11)))))))))))
#endif
long double __cosl(long double x, long double y)