Print this page
11210 libm should be cstyle(1ONBLD) clean
*** 16,36 ****
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma weak __sinh = sinh
! /* INDENT OFF */
/*
* sinh(x)
* Code originated from 4.3bsd.
* Modified by K.C. Ng for SUN 4.0 libm.
* Method :
--- 16,38 ----
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
+
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
*/
+
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma weak __sinh = sinh
!
/*
* sinh(x)
* Code originated from 4.3bsd.
* Modified by K.C. Ng for SUN 4.0 libm.
* Method :
*** 46,79 ****
* Special cases:
* sinh(x) is x if x is +INF, -INF, or NaN.
* only sinh(0)=0 is exact for finite argument.
*
*/
- /* INDENT ON */
#include "libm.h"
! static const double
! ln2hi = 6.93147180369123816490e-01,
ln2lo = 1.90821492927058770002e-10,
lnovft = 7.09782712893383973096e+02;
double
! sinh(double x) {
double ox, r, t;
ox = x;
r = fabs(x);
if (!finite(x))
return (x * r);
if (r < lnovft) {
t = expm1(r);
r = copysign((t + t / (1.0 + t)) * 0.5, x);
} else {
if (r < 1000.0)
x = copysign(exp((r - 1024 * ln2hi) - 1024 * ln2lo), x);
r = scalbn(x, 1023);
}
if (!finite(r))
r = _SVID_libm_err(ox, ox, 25);
return (r);
}
--- 48,85 ----
* Special cases:
* sinh(x) is x if x is +INF, -INF, or NaN.
* only sinh(0)=0 is exact for finite argument.
*
*/
#include "libm.h"
! static const double ln2hi = 6.93147180369123816490e-01,
ln2lo = 1.90821492927058770002e-10,
lnovft = 7.09782712893383973096e+02;
double
! sinh(double x)
! {
double ox, r, t;
ox = x;
r = fabs(x);
+
if (!finite(x))
return (x * r);
+
if (r < lnovft) {
t = expm1(r);
r = copysign((t + t / (1.0 + t)) * 0.5, x);
} else {
if (r < 1000.0)
x = copysign(exp((r - 1024 * ln2hi) - 1024 * ln2lo), x);
+
r = scalbn(x, 1023);
}
+
if (!finite(r))
r = _SVID_libm_err(ox, ox, 25);
+
return (r);
}