| 1 | /* w_coshf.c -- float version of w_cosh.c. | 
|---|
| 2 | * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. | 
|---|
| 3 | * Optimizations by Ulrich Drepper <drepper@gmail.com>, 2011. | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | /* | 
|---|
| 7 | * ==================================================== | 
|---|
| 8 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | 
|---|
| 9 | * | 
|---|
| 10 | * Developed at SunPro, a Sun Microsystems, Inc. business. | 
|---|
| 11 | * Permission to use, copy, modify, and distribute this | 
|---|
| 12 | * software is freely granted, provided that this notice | 
|---|
| 13 | * is preserved. | 
|---|
| 14 | * ==================================================== | 
|---|
| 15 | */ | 
|---|
| 16 |  | 
|---|
| 17 | /* | 
|---|
| 18 | * wrapper coshf(x) | 
|---|
| 19 | */ | 
|---|
| 20 |  | 
|---|
| 21 | #include <math.h> | 
|---|
| 22 | #include <math_private.h> | 
|---|
| 23 | #include <math-svid-compat.h> | 
|---|
| 24 | #include <libm-alias-float.h> | 
|---|
| 25 |  | 
|---|
| 26 | #if LIBM_SVID_COMPAT | 
|---|
| 27 | float | 
|---|
| 28 | __coshf (float x) | 
|---|
| 29 | { | 
|---|
| 30 | float z = __ieee754_coshf (x); | 
|---|
| 31 | if (__builtin_expect (!isfinite (z), 0) && isfinite (x) | 
|---|
| 32 | && _LIB_VERSION != _IEEE_) | 
|---|
| 33 | return __kernel_standard_f (x, x, 105); /* cosh overflow */ | 
|---|
| 34 |  | 
|---|
| 35 | return z; | 
|---|
| 36 | } | 
|---|
| 37 | libm_alias_float (__cosh, cosh) | 
|---|
| 38 | #endif | 
|---|
| 39 |  | 
|---|