3#ifndef TETL_CMATH_LOG_HPP
4#define TETL_CMATH_LOG_HPP
8#include <etl/_3rd_party/gcem/gcem.hpp>
16inline constexpr struct log {
17 template <
typename Float>
18 [[nodiscard]]
constexpr auto operator()(Float v)
const noexcept -> Float
21#if __has_builtin(__builtin_logf)
23 return __builtin_logf(v);
26#if __has_builtin(__builtin_log)
28 return __builtin_log(v);
33 return etl::detail::gcem::log(v);
44[[nodiscard]]
constexpr auto log(
float v)
noexcept ->
float {
return etl::detail::log(v); }
45[[nodiscard]]
constexpr auto logf(
float v)
noexcept ->
float {
return etl::detail::log(v); }
46[[nodiscard]]
constexpr auto log(
double v)
noexcept ->
double {
return etl::detail::log(v); }
47[[nodiscard]]
constexpr auto log(
long double v)
noexcept ->
long double {
return etl::detail::log(v); }
48[[nodiscard]]
constexpr auto logl(
long double v)
noexcept ->
long double {
return etl::detail::log(v); }
49[[nodiscard]]
constexpr auto log(
integral auto arg)
noexcept ->
double {
return etl::detail::log(
double(
arg)); }
The concept integral<T> is satisfied if and only if T is an integral type.
Definition integral.hpp:13
constexpr auto logf(float v) noexcept -> float
Computes the natural (base e) logarithm of arg.
Definition log.hpp:45
constexpr auto log(float v) noexcept -> float
Computes the natural (base e) logarithm of arg.
Definition log.hpp:44
constexpr auto logl(long double v) noexcept -> long double
Computes the natural (base e) logarithm of arg.
Definition log.hpp:48
constexpr auto arg(complex< T > const &z) noexcept -> T
Definition arg.hpp:15
Definition adjacent_find.hpp:8
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:16
constexpr bool is_same_v
Definition is_same.hpp:11