diff options
| author | nsz <nsz@port70.net> | 2012-03-19 23:41:19 +0100 | 
|---|---|---|
| committer | nsz <nsz@port70.net> | 2012-03-19 23:41:19 +0100 | 
| commit | 0cbb65479147ecdaa664e88cc2a5a925f3de502f (patch) | |
| tree | 7b6dc53fcec6497d55746d3cc47f167a20b7aa57 /src/math/asinhf.c | |
| parent | b03255af77776703c8d48819e824d09f6f54ba86 (diff) | |
| download | musl-0cbb65479147ecdaa664e88cc2a5a925f3de502f.tar.gz | |
code cleanup of named constants
zero, one, two, half are replaced by const literals
The policy was to use the f suffix for float consts (1.0f),
but don't use suffix for long double consts (these consts
can be exactly represented as double).
Diffstat (limited to 'src/math/asinhf.c')
| -rw-r--r-- | src/math/asinhf.c | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/src/math/asinhf.c b/src/math/asinhf.c index cb6e5b89..efe3af94 100644 --- a/src/math/asinhf.c +++ b/src/math/asinhf.c @@ -16,7 +16,6 @@  #include "libm.h"  static const float -one = 1.0000000000e+00, /* 0x3F800000 */  ln2 = 6.9314718246e-01, /* 0x3f317218 */  huge= 1.0000000000e+30; @@ -31,17 +30,17 @@ float asinhf(float x)  		return x+x;  	if (ix < 0x31800000) {  /* |x| < 2**-28 */  		/* return x inexact except 0 */ -		if (huge+x > one) +		if (huge+x > 1.0f)  			return x;  	}  	if (ix > 0x4d800000) {  /* |x| > 2**28 */  		w = logf(fabsf(x)) + ln2;  	} else if (ix > 0x40000000) {  /* 2**28 > |x| > 2.0 */  		t = fabsf(x); -		w = logf(2.0f*t + one/(sqrtf(x*x+one)+t)); +		w = logf(2.0f*t + 1.0f/(sqrtf(x*x+1.0f)+t));  	} else {                /* 2.0 > |x| > 2**-28 */  		t = x*x; -		w =log1pf(fabsf(x) + t/(one+sqrtf(one+t))); +		w =log1pf(fabsf(x) + t/(1.0f+sqrtf(1.0f+t)));  	}  	if (hx > 0)  		return w; | 
