File indexing completed on 2026-05-03 08:13:34
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _LIBCPP___CXX03___MATH_TRIGONOMETRIC_FUNCTIONS_H
0010 #define _LIBCPP___CXX03___MATH_TRIGONOMETRIC_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 cos(float __x) _NOEXCEPT { return __builtin_cosf(__x); }
0027
0028 template <class = int>
0029 _LIBCPP_HIDE_FROM_ABI double cos(double __x) _NOEXCEPT {
0030 return __builtin_cos(__x);
0031 }
0032
0033 inline _LIBCPP_HIDE_FROM_ABI long double cos(long double __x) _NOEXCEPT { return __builtin_cosl(__x); }
0034
0035 template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
0036 inline _LIBCPP_HIDE_FROM_ABI double cos(_A1 __x) _NOEXCEPT {
0037 return __builtin_cos((double)__x);
0038 }
0039
0040
0041
0042 inline _LIBCPP_HIDE_FROM_ABI float sin(float __x) _NOEXCEPT { return __builtin_sinf(__x); }
0043
0044 template <class = int>
0045 _LIBCPP_HIDE_FROM_ABI double sin(double __x) _NOEXCEPT {
0046 return __builtin_sin(__x);
0047 }
0048
0049 inline _LIBCPP_HIDE_FROM_ABI long double sin(long double __x) _NOEXCEPT { return __builtin_sinl(__x); }
0050
0051 template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
0052 inline _LIBCPP_HIDE_FROM_ABI double sin(_A1 __x) _NOEXCEPT {
0053 return __builtin_sin((double)__x);
0054 }
0055
0056
0057
0058 inline _LIBCPP_HIDE_FROM_ABI float tan(float __x) _NOEXCEPT { return __builtin_tanf(__x); }
0059
0060 template <class = int>
0061 _LIBCPP_HIDE_FROM_ABI double tan(double __x) _NOEXCEPT {
0062 return __builtin_tan(__x);
0063 }
0064
0065 inline _LIBCPP_HIDE_FROM_ABI long double tan(long double __x) _NOEXCEPT { return __builtin_tanl(__x); }
0066
0067 template <class _A1, __enable_if_t<is_integral<_A1>::value, int> = 0>
0068 inline _LIBCPP_HIDE_FROM_ABI double tan(_A1 __x) _NOEXCEPT {
0069 return __builtin_tan((double)__x);
0070 }
0071
0072 }
0073
0074 _LIBCPP_END_NAMESPACE_STD
0075
0076 #endif