projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix trailing whitespace issues that crept in here and there
[musl]
/
src
/
math
/
acoshf.c
diff --git
a/src/math/acoshf.c
b/src/math/acoshf.c
index
57ce5cb
..
0f7aae2
100644
(file)
--- a/
src/math/acoshf.c
+++ b/
src/math/acoshf.c
@@
-16,7
+16,6
@@
#include "libm.h"
static const float
#include "libm.h"
static const float
-one = 1.0,
ln2 = 6.9314718246e-01; /* 0x3f317218 */
float acoshf(float x)
ln2 = 6.9314718246e-01; /* 0x3f317218 */
float acoshf(float x)
@@
-32,12
+31,12
@@
float acoshf(float x)
return x + x;
return logf(x) + ln2; /* acosh(huge)=log(2x) */
} else if (hx == 0x3f800000) {
return x + x;
return logf(x) + ln2; /* acosh(huge)=log(2x) */
} else if (hx == 0x3f800000) {
- return 0.0; /* acosh(1) = 0 */
+ return 0.0
f
; /* acosh(1) = 0 */
} else if (hx > 0x40000000) { /* 2**28 > x > 2 */
t = x*x;
} else if (hx > 0x40000000) { /* 2**28 > x > 2 */
t = x*x;
- return logf(2.0f*x -
one/(x+sqrtf(t-one
)));
+ return logf(2.0f*x -
1.0f/(x+sqrtf(t-1.0f
)));
} else { /* 1 < x < 2 */
} else { /* 1 < x < 2 */
- t = x-
one
;
+ t = x-
1.0f
;
return log1pf(t + sqrtf(2.0f*t+t*t));
}
}
return log1pf(t + sqrtf(2.0f*t+t*t));
}
}