4#ifndef TETL_CMATH_POW_HPP
5#define TETL_CMATH_POW_HPP
7#include <etl/_config/all.hpp>
9#include <etl/_3rd_party/gcem/gcem.hpp>
10#include <etl/_type_traits/is_constant_evaluated.hpp>
20#if __has_constexpr_builtin(__builtin_powf)
21 return __builtin_powf(base, exp);
23 return etl::detail::gcem::pow(base, exp);
26#if __has_builtin(__builtin_powf)
27 return __builtin_powf(base, exp);
29 return etl::detail::gcem::pow(base, exp);
47#if __has_constexpr_builtin(__builtin_pow)
48 return __builtin_pow(base, exp);
50 return etl::detail::gcem::pow(base, exp);
53#if __has_builtin(__builtin_pow)
54 return __builtin_pow(base, exp);
56 return etl::detail::gcem::pow(base, exp);
63[[
nodiscard]]
constexpr auto pow(
long double base,
long double exp) ->
long double
65 return detail::gcem::pow(base, exp);
71[[
nodiscard]]
constexpr auto powl(
long double base,
long double exp) ->
long double
95[[
nodiscard]]
constexpr auto pow(
long double base,
int iexp) ->
long double
97 return etl::pow(base
, static_cast<
long double>(iexp)
);
constexpr auto pow(long double base, int iexp) -> long double
Computes the value of base raised to the power exp.
Definition pow.hpp:95
constexpr auto powl(long double base, long double exp) -> long double
Computes the value of base raised to the power exp.
Definition pow.hpp:71
constexpr auto pow(float base, int iexp) -> float
Computes the value of base raised to the power exp.
Definition pow.hpp:79
constexpr auto pow(long double base, long double exp) -> long double
Computes the value of base raised to the power exp.
Definition pow.hpp:63
constexpr auto pow(double base, int iexp) -> double
Computes the value of base raised to the power exp.
Definition pow.hpp:87
constexpr auto pow(float base, float exp) -> float
Computes the value of base raised to the power exp.
Definition pow.hpp:17
constexpr auto pow(double base, double exp) -> double
Computes the value of base raised to the power exp.
Definition pow.hpp:44
constexpr auto powf(float base, float exp) -> float
Computes the value of base raised to the power exp.
Definition pow.hpp:36
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