4#ifndef TETL_CMATH_TAN_HPP
5#define TETL_CMATH_TAN_HPP
7#include <etl/_config/all.hpp>
9#include <etl/_3rd_party/gcem/gcem.hpp>
10#include <etl/_concepts/integral.hpp>
11#include <etl/_concepts/same_as.hpp>
12#include <etl/_type_traits/is_constant_evaluated.hpp>
18inline constexpr struct tan {
19 template <
typename Float>
20 [[nodiscard]]
constexpr auto operator()(Float arg)
const noexcept -> Float
23#if __has_builtin(__builtin_tanf)
24 if constexpr (
etl::same_as<Float,
float>) {
25 return __builtin_tanf(arg);
28#if __has_builtin(__builtin_tan)
29 if constexpr (
etl::same_as<Float,
double>) {
30 return __builtin_tan(arg);
34 return etl::detail::gcem::tan(arg);
47 return etl::detail::tan(arg);
51 return etl::detail::tan(arg);
55 return etl::detail::tan(arg);
57[[
nodiscard]]
constexpr auto tan(
long double arg)
noexcept ->
long double
59 return etl::detail::tan(arg);
61[[
nodiscard]]
constexpr auto tanl(
long double arg)
noexcept ->
long double
63 return etl::detail::tan(arg);
constexpr auto tanf(float arg) noexcept -> float
Definition tan.hpp:49
constexpr auto tan(float arg) noexcept -> float
Definition tan.hpp:45
constexpr auto tan(long double arg) noexcept -> long double
Definition tan.hpp:57
constexpr auto tanl(long double arg) noexcept -> long double
Definition tan.hpp:61
constexpr auto tan(double arg) noexcept -> double
Definition tan.hpp:53
Definition adjacent_find.hpp:9
constexpr auto is_constant_evaluated() noexcept -> bool
Detects whether the function call occurs within a constant-evaluated context. Returns true if the eva...
Definition is_constant_evaluated.hpp:17