Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
approx.cppm File Reference

Compatibility bridge for IEEE approximation policies. More...

#include <concepts>
import dedekind.numbers.ieee;
import dedekind.numbers;
import dedekind.ieee.approx;
import dedekind.category;
Include dependency graph for approx.cppm:

Namespaces

namespace  dedekind::numbers

Concepts

concept  dedekind::numbers::IsIEEEPropagationOp

Typedefs

template<std::floating_point F = machine_real_scalar>
using dedekind::numbers::Approx = dedekind::ieee::Approx<F>
template<std::floating_point F = machine_real_scalar>
using dedekind::numbers::ReportErrorPolicy = dedekind::ieee::ReportErrorPolicy<F>
template<std::floating_point F = machine_real_scalar>
using dedekind::numbers::IgnoreErrorPolicy = dedekind::ieee::IgnoreErrorPolicy<F>
template<std::floating_point F = machine_real_scalar>
using dedekind::numbers::AdaptiveErrorPolicy = dedekind::ieee::AdaptiveErrorPolicy<F>

Enumerations

enum class  dedekind::numbers::NumericRegion
 Region tags for simple runtime numeric diagnostics.

Functions

template<std::floating_point F = machine_real_scalar>
constexpr NumericRegion dedekind::numbers::classify_region (F x, F near_zero_scale=F{64}, F huge_scale=F{0.5}) noexcept
template<std::floating_point F = machine_real_scalar>
constexpr F dedekind::numbers::roundoff_proxy (F x) noexcept
template<std::floating_point F, typename Op>
requires IsIEEEPropagationOp<Op, F>
constexpr Approx< F > dedekind::numbers::propagate (const Approx< F > &a, const Approx< F > &b, const Op &op={}) noexcept
 Propagate approximation error through a binary IEEE operation.
template<std::floating_point F = double>
constexpr Approx< F > dedekind::numbers::demo_propagate_add (const Approx< F > &a, const Approx< F > &b) noexcept
 Demo: propagate error through IEEE addition.
template<std::floating_point F = double>
constexpr Approx< F > dedekind::numbers::demo_propagate_mul (const Approx< F > &a, const Approx< F > &b) noexcept
 Demo: propagate error through IEEE multiplication.
template<std::floating_point F = double>
constexpr IEEE< F > dedekind::numbers::demo_add_ignore (const IEEE< F > &a, const IEEE< F > &b) noexcept
template<std::floating_point F = double>
constexpr Approx< F > dedekind::numbers::demo_add_report (const IEEE< F > &a, const IEEE< F > &b) noexcept
 Demo operation: IEEE add under report policy.
template<std::floating_point F = double>
constexpr TernaryResult< Approx< F > > dedekind::numbers::demo_add_adaptive (const IEEE< F > &a, const IEEE< F > &b) noexcept
 Demo operation: IEEE add under adaptive policy.

Detailed Description

Compatibility bridge for IEEE approximation policies.

Note
"Lorsque les valeurs successivement attribuees a une meme variable s'approchent indefiniment d'une valeur fixe, de maniere a finir par en differer aussi peu qu'on voudra, cette derniere est appelee la limite de toutes les autres." ("When the values successively assigned to the same variable approach a fixed value indefinitely, so as to differ from it by as little as one wishes, this latter is called the limit of all the others.") – Augustin-Louis Cauchy, Cours d'Analyse (1821)