|
libfxd 0.2.dev
A fixed-point library for C++.
|
#include <algorithm>#include <bit>#include <cassert>#include <cerrno>#include <numeric>#include <utility>#include "casting.hpp"#include "compare.hpp"#include "concepts.hpp"#include "constructors.hpp"#include "limits.hpp"#include "operators.hpp"#include "round-div.hpp"#include "round-mul.hpp"#include "detail/add.hpp"#include "detail/shift.hpp"Go to the source code of this file.
Namespaces | |
| namespace | fxd |
| This is the namespace where the entire library is defined. | |
| namespace | fxd::zero |
| Round to zero. | |
| namespace | fxd::down |
| Round down. | |
| namespace | fxd::up |
| Round up. | |
Functions | |
| template<fixed_point Fxd> | |
| constexpr Fxd | abs (Fxd f) noexcept |
Same as std::abs(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | fdim (Fxd a, Fxd b) noexcept |
Same as std::fdim(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | fma (Fxd a, Fxd b, Fxd c) noexcept |
Same as std::fma(). | |
| template<fixed_point Fxd> | |
| constexpr int | ilogb (Fxd x) noexcept |
Same as std::ilogb(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | ldexp (Fxd x, int exp) noexcept |
Same as std::ldexp(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | ldexp (Fxd x, int exp) noexcept |
Same as std::ldexp(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | ldexp (Fxd x, int exp) noexcept |
Same as std::ldexp(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | midpoint (Fxd a, Fxd b) noexcept |
Same as std::midpoint(). | |
| template<fixed_point Fxd> | |
| constexpr Fxd | nextafter (Fxd from, Fxd to) noexcept |
Same as std::nextafter(). | |
| template<unsigned_fixed_point Fxd> requires (Fxd::int_bits > 0 && Fxd::frac_bits >= 0) | |
| constexpr Fxd | sqrt (Fxd x) noexcept |
Same as std::sqrt(). | |
| template<signed_fixed_point Fxd> requires (Fxd::int_bits > 1 && Fxd::frac_bits >= 0) | |
| constexpr Fxd | sqrt (Fxd x) noexcept |
| template<unsigned_fixed_point Fxd> requires (Fxd::int_bits > 0 && Fxd::frac_bits >= 0) | |
| Fxd | sqrt_bin (Fxd x) noexcept |
| template<signed_fixed_point Fxd> requires (Fxd::int_bits > 1 && Fxd::frac_bits >= 0) | |
| Fxd | sqrt_bin (Fxd x) noexcept |