Deleted Added
full compact
e_sinh.c (8870) e_sinh.c (17141)
1/* @(#)e_sinh.c 5.1 93/09/24 */
2/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13#ifndef lint
1/* @(#)e_sinh.c 5.1 93/09/24 */
2/*
3 * ====================================================
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 *
6 * Developed at SunPro, a Sun Microsystems, Inc. business.
7 * Permission to use, copy, modify, and distribute this
8 * software is freely granted, provided that this notice
9 * is preserved.
10 * ====================================================
11 */
12
13#ifndef lint
14static char rcsid[] = "$Id: e_sinh.c,v 1.1.1.1 1994/08/19 09:39:44 jkh Exp $";
14static char rcsid[] = "$Id: e_sinh.c,v 1.2 1995/05/30 05:48:48 rgrimes Exp $";
15#endif
16
17/* __ieee754_sinh(x)
18 * Method :
19 * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
20 * 1. Replace x by |x| (sinh(-x) = -sinh(x)).
21 * 2.
22 * E + E/(E+1)

--- 47 unchanged lines hidden (view full) ---

70 return h*(t+t/(t+one));
71 }
72
73 /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */
74 if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
75
76 /* |x| in [log(maxdouble), overflowthresold] */
77 GET_LOW_WORD(lx,x);
15#endif
16
17/* __ieee754_sinh(x)
18 * Method :
19 * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
20 * 1. Replace x by |x| (sinh(-x) = -sinh(x)).
21 * 2.
22 * E + E/(E+1)

--- 47 unchanged lines hidden (view full) ---

70 return h*(t+t/(t+one));
71 }
72
73 /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */
74 if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
75
76 /* |x| in [log(maxdouble), overflowthresold] */
77 GET_LOW_WORD(lx,x);
78 if (ix<0x408633CE || (ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d)) {
78 if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) {
79 w = __ieee754_exp(0.5*fabs(x));
80 t = h*w;
81 return t*w;
82 }
83
84 /* |x| > overflowthresold, sinh(x) overflow */
85 return x*shuge;
86}
79 w = __ieee754_exp(0.5*fabs(x));
80 t = h*w;
81 return t*w;
82 }
83
84 /* |x| > overflowthresold, sinh(x) overflow */
85 return x*shuge;
86}