|
ftz 0.0.1
Fast, reproducible floating-point arithmetic
|
Functions | |
|
template<class R, std::size_t N> requires detail::ftz32_vector<R> | |
| constexpr std::array< R, N > | ftz::add (std::array< R, N > const &a, std::array< R, N > const &b) noexcept |
| Adds matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N, class B> requires detail::ftz32_vector<R> && std::convertible_to<B const &,R> | |
| constexpr std::array< R, N > | ftz::add (std::array< R, N > const &a, B const &b) noexcept(std::is_nothrow_constructible_v< R, B const & >) |
| Adds matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N, class A> requires detail::ftz32_vector<R> && std::convertible_to<A const &,R> | |
| constexpr std::array< R, N > | ftz::add (A const &a, std::array< R, N > const &b) noexcept(std::is_nothrow_constructible_v< R, A const & >) |
| Adds matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N> requires detail::ftz32_vector<R> | |
| constexpr std::array< R, N > | ftz::sub (std::array< R, N > const &a, std::array< R, N > const &b) noexcept |
| Subtracts matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N, class B> requires detail::ftz32_vector<R> && std::convertible_to<B const &,R> | |
| constexpr std::array< R, N > | ftz::sub (std::array< R, N > const &a, B const &b) noexcept(std::is_nothrow_constructible_v< R, B const & >) |
| Subtracts matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N, class A> requires detail::ftz32_vector<R> && std::convertible_to<A const &,R> | |
| constexpr std::array< R, N > | ftz::sub (A const &a, std::array< R, N > const &b) noexcept(std::is_nothrow_constructible_v< R, A const & >) |
| Subtracts matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N> requires detail::ftz32_vector<R> | |
| constexpr std::array< R, N > | ftz::mul (std::array< R, N > const &a, std::array< R, N > const &b) noexcept |
| Multiplies matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N, class B> requires detail::ftz32_vector<R> && std::convertible_to<B const &,R> | |
| constexpr std::array< R, N > | ftz::mul (std::array< R, N > const &a, B const &b) noexcept(std::is_nothrow_constructible_v< R, B const & >) |
| Multiplies matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N, class A> requires detail::ftz32_vector<R> && std::convertible_to<A const &,R> | |
| constexpr std::array< R, N > | ftz::mul (A const &a, std::array< R, N > const &b) noexcept(std::is_nothrow_constructible_v< R, A const & >) |
| Multiplies matching register arrays; a non-array operand is converted once and broadcast, with conversion noexcept retained. Returns std::array<R,N>. | |
|
template<class R, std::size_t N> requires detail::ftz32_vector<R> | |
| constexpr std::array< R, N > | ftz::fma (std::array< R, N > const &a, std::array< R, N > const &b, std::array< R, N > const &c) noexcept |
| Evaluates fused a*b+c in one FTZ policy; array results retain the same element type and extent. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr auto | ftz::sin (std::array< R, N > const &input) noexcept |
| Computes sine in radians with dedicated output reconstruction and the scalar FTZ special-value rules. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr auto | ftz::cos (std::array< R, N > const &input) noexcept |
| Computes cosine in radians with dedicated output reconstruction and the scalar FTZ special-value rules. Returns std::array<R,N>. | |
| template<unsigned int Degree = 6, detail::ftz32_value R, std::size_t N> requires (Degree >= 1 && Degree <= 7) | |
| constexpr auto | ftz::exp (std::array< R, N > const &input) noexcept |
| Computes the exponential with the scalar FTZ underflow, overflow and special-value rules. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N, bool Flush, unsigned int Degree> requires (!Flush && Degree >= 1 && Degree <= 7) | |
| constexpr auto | ftz::exp (std::array< R, N > const &input, std::bool_constant< Flush >, std::integral_constant< unsigned int, Degree >) noexcept |
| Delegates native's degree-aware ADL call to the register-array FTZ exponential. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr auto | ftz::expm1 (std::array< R, N > const &input) noexcept |
| Computes exp(x)-1 with the scalar FTZ graph, preserving signed zero. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr auto | ftz::sincos (std::array< R, N > const &input) noexcept |
| Computes sine and cosine in radians with the scalar special-value rules; returns a pair in that order. Each member is std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::tanh (std::array< R, N > const &input) noexcept |
| Computes hyperbolic tangent with the scalar FTZ graph, preserving signed zero and saturating infinities. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::log (std::array< R, N > const &input) noexcept |
| Computes natural logarithms; either zero gives negative infinity, negative nonzero values give NaN. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::log1p (std::array< R, N > const &input) noexcept |
| Computes log(1+x), preserving signed zero; -1 gives negative infinity and x < -1 gives NaN. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::atan2 (std::array< R, N > const &y, std::array< R, N > const &x) noexcept |
| Computes atan2(y,x) in radians with the scalar FTZ signed-axis and infinity rules. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::floor (std::array< R, N > const &input) noexcept |
| Rounds toward negative infinity, independently of ambient rounding mode; signed zero and infinities survive. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::ceil (std::array< R, N > const &input) noexcept |
| Rounds toward positive infinity, independently of ambient rounding mode; signed zero and infinities survive. Returns std::array<R,N>. | |
| template<detail::ftz32_value R, std::size_t N> | |
| constexpr std::array< R, N > | ftz::trunc (std::array< R, N > const &input) noexcept |
| Rounds toward zero, independently of ambient rounding mode; signed zero and infinities survive. Returns std::array<R,N>. | |
Matching arrays retain their element type and extent, including extent zero. Transcendental arrays accept FTZ scalars or FTZ vectors. Batched add/sub/mul and fma accept FTZ vectors, issuing native operations before boundary repair. These named overloads also supply the array path used by ::native::wide.
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |