From 7e71d459b4104aae67ad092172be295cc221e284 Mon Sep 17 00:00:00 2001 From: nsz Date: Mon, 12 Mar 2012 21:51:04 +0100 Subject: [PATCH] sinh, cosh comment fixes --- src/math/cosh.c | 4 ++-- src/math/sinh.c | 1 + src/math/sinhf.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/math/cosh.c b/src/math/cosh.c index cd5d749..5b871db 100644 --- a/src/math/cosh.c +++ b/src/math/cosh.c @@ -55,7 +55,7 @@ double cosh(double x) return one + (t*t)/(w+w); } - /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */ + /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|))/2; */ if (ix < 0x40360000) { t = exp(fabs(x)); return half*t + half/t; @@ -66,7 +66,7 @@ double cosh(double x) return half*exp(fabs(x)); /* |x| in [log(maxdouble), overflowthresold] */ - if (ix<=0x408633CE) + if (ix <= 0x408633CE) return __ldexp_exp(fabs(x), -1); /* |x| > overflowthresold, cosh(x) overflow */ diff --git a/src/math/sinh.c b/src/math/sinh.c index 0972777..5e037e5 100644 --- a/src/math/sinh.c +++ b/src/math/sinh.c @@ -64,6 +64,7 @@ double sinh(double x) /* |x| in [log(maxdouble), overflowthresold] */ if (ix <= 0x408633CE) + // FIXME: 0.5 * 2.0 * huge == huge ? return h*2.0*__ldexp_exp(fabs(x), -1); /* |x| > overflowthresold, sinh(x) overflow */ diff --git a/src/math/sinhf.c b/src/math/sinhf.c index a66ed1a..15c5013 100644 --- a/src/math/sinhf.c +++ b/src/math/sinhf.c @@ -50,6 +50,7 @@ float sinhf(float x) /* |x| in [logf(maxfloat), overflowthresold] */ if (ix <= 0x42b2d4fc) + // FIXME: 0.5f * 2.0f * huge == huge ? return h*2.0F*__ldexp_expf(fabsf(x), -1); /* |x| > overflowthresold, sinh(x) overflow */ -- 2.20.1