File indexing completed on 2026-05-03 08:13:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _LIBCPP___CXX03___MATH_HYPERBOLIC_FUNCTIONS_H
0010 #define _LIBCPP___CXX03___MATH_HYPERBOLIC_FUNCTIONS_H
0011
0012 #include <__cxx03/__config>
0013 #include <__cxx03/__type_traits/enable_if.h>
0014 #include <__cxx03/__type_traits/is_integral.h>
0015
0016 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0017 # pragma GCC system_header
0018 #endif
0019
0020 _LIBCPP_BEGIN_NAMESPACE_STD
0021
0022 namespace __math {
0023
0024
0025
0026 inline _LIBCPP_HIDE_FROM_ABI float cosh(float __x) _NOEXCEPT { return __builtin_coshf(__x); }
0027
0028 template <class = int>
0029 _LIBCPP_HIDE_FROM_ABI double cosh(double __x) _NOEXCEPT {
0030 return __builtin_cosh(__x);
0031 }
0032
0033 inline _LIBCPP_HIDE_FROM_ABI long double cosh(long double __x) _NOEXCEPT { return __builtin_coshl(__x); }
0034
0035 template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
0036 inline _LIBCPP_HIDE_FROM_ABI double cosh(_A1 __x) _NOEXCEPT {
0037 return __builtin_cosh((double)__x);
0038 }
0039
0040
0041
0042 inline _LIBCPP_HIDE_FROM_ABI float sinh(float __x) _NOEXCEPT { return __builtin_sinhf(__x); }
0043
0044 template <class = int>
0045 _LIBCPP_HIDE_FROM_ABI double sinh(double __x) _NOEXCEPT {
0046 return __builtin_sinh(__x);
0047 }
0048
0049 inline _LIBCPP_HIDE_FROM_ABI long double sinh(long double __x) _NOEXCEPT { return __builtin_sinhl(__x); }
0050
0051 template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
0052 inline _LIBCPP_HIDE_FROM_ABI double sinh(_A1 __x) _NOEXCEPT {
0053 return __builtin_sinh((double)__x);
0054 }
0055
0056
0057
0058 inline _LIBCPP_HIDE_FROM_ABI float tanh(float __x) _NOEXCEPT { return __builtin_tanhf(__x); }
0059
0060 template <class = int>
0061 _LIBCPP_HIDE_FROM_ABI double tanh(double __x) _NOEXCEPT {
0062 return __builtin_tanh(__x);
0063 }
0064
0065 inline _LIBCPP_HIDE_FROM_ABI long double tanh(long double __x) _NOEXCEPT { return __builtin_tanhl(__x); }
0066
0067 template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
0068 inline _LIBCPP_HIDE_FROM_ABI double tanh(_A1 __x) _NOEXCEPT {
0069 return __builtin_tanh((double)__x);
0070 }
0071
0072 }
0073
0074 _LIBCPP_END_NAMESPACE_STD
0075
0076 #endif