3#ifndef TETL_CMATH_FMA_HPP
4#define TETL_CMATH_FMA_HPP
15inline constexpr struct fma {
16 template <
typename Float>
17 [[nodiscard]]
constexpr auto operator()(Float x, Float y, Float z)
const noexcept -> Float
20#if __has_builtin(__builtin_fmaf)
22 return __builtin_fmaf(x, y, z);
25#if __has_builtin(__builtin_fma)
27 return __builtin_fma(x, y, z);
44[[nodiscard]]
constexpr auto fma(
float x,
float y,
float z)
noexcept ->
float {
return etl::detail::fma(x, y, z); }
45[[nodiscard]]
constexpr auto fmaf(
float x,
float y,
float z)
noexcept ->
float {
return etl::detail::fma(x, y, z); }
46[[nodiscard]]
constexpr auto fma(
double x,
double y,
double z)
noexcept ->
double {
return etl::detail::fma(x, y, z); }
47[[nodiscard]]
constexpr auto fma(
long double x,
long double y,
long double z)
noexcept ->
long double
49 return etl::detail::fma(x, y, z);
51[[nodiscard]]
constexpr auto fmal(
long double x,
long double y,
long double z)
noexcept ->
long double
53 return etl::detail::fma(x, y, z);
constexpr auto fma(float x, float y, float z) noexcept -> float
Computes (x*y) + z as if to infinite precision and rounded only once to fit the result type.
Definition fma.hpp:44
constexpr auto fmal(long double x, long double y, long double z) noexcept -> long double
Computes (x*y) + z as if to infinite precision and rounded only once to fit the result type.
Definition fma.hpp:51
constexpr auto fmaf(float x, float y, float z) noexcept -> float
Computes (x*y) + z as if to infinite precision and rounded only once to fit the result type.
Definition fma.hpp:45
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