We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05a9781 commit cd97828Copy full SHA for cd97828
src/libc/expm1.c
@@ -1,24 +1,14 @@
1
#include <math.h>
2
3
-float expm1f(const float x)
+float expm1f(float x)
4
{
5
- #if 1
6
- /**
7
- * 0x1.0p-12f: At least 12.0bits of precision
8
- */
9
- if (fabsf(x) < 2.44140625e-4f /* 0x1.0p-12f */) {
10
- return x;
11
- }
12
- #else
13
14
- * 0x1.0p-8f: At least 16.0bits of precision
15
16
- if (fabsf(x) < 3.90625e-3f /* 0x1.0p-8f */) {
17
- return x + 0.5f * (x * x);
18
19
- #endif
+ /**
+ * 0x1.0p-8f: At least 16.0bits of precision
+ */
+ if (fabsf(x) < 3.90625e-3f /* 0x1.0p-8f */) {
+ return x + 0.5f * (x * x);
+ }
20
return expf(x) - 1.0f;
21
}
22
23
-
24
double expm1(double) __attribute__((alias("expm1f")));
0 commit comments