]>
Commit | Line | Data |
---|---|---|
2aa62f2b | 1 | /* @(#)w_cosh.c 5.1 93/09/24 */\r |
2 | /*\r | |
3 | * ====================================================\r | |
4 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\r | |
5 | *\r | |
6 | * Developed at SunPro, a Sun Microsystems, Inc. business.\r | |
7 | * Permission to use, copy, modify, and distribute this\r | |
8 | * software is freely granted, provided that this notice\r | |
9 | * is preserved.\r | |
10 | * ====================================================\r | |
11 | */\r | |
12 | #include <LibConfig.h>\r | |
13 | #include <sys/EfiCdefs.h>\r | |
14 | #if defined(LIBM_SCCS) && !defined(lint)\r | |
15 | __RCSID("$NetBSD: w_cosh.c,v 1.9 2002/05/26 22:02:00 wiz Exp $");\r | |
16 | #endif\r | |
17 | \r | |
18 | /*\r | |
19 | * wrapper cosh(x)\r | |
20 | */\r | |
21 | \r | |
22 | #include "math.h"\r | |
23 | #include "math_private.h"\r | |
24 | \r | |
25 | double\r | |
26 | cosh(double x) /* wrapper cosh */\r | |
27 | {\r | |
28 | #ifdef _IEEE_LIBM\r | |
29 | return __ieee754_cosh(x);\r | |
30 | #else\r | |
31 | double z;\r | |
32 | z = __ieee754_cosh(x);\r | |
33 | if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\r | |
34 | if(fabs(x)>7.10475860073943863426e+02) {\r | |
35 | return __kernel_standard(x,x,5); /* cosh overflow */\r | |
36 | } else\r | |
37 | return z;\r | |
38 | #endif\r | |
39 | }\r |