|
struct | constant |
| type whose value is also its non-type template parameter More...
|
|
struct | convert |
| converts a value from one type to another More...
|
|
struct | custom_operator |
| customization point for operator overloads More...
|
|
struct | custom_operator< _impl::convert_op, op_value< Input, _impl::native_tag >, op_value< scaled_integer< ResultRep, power< ResultExponent, ResultRadix > >, neg_inf_rounding_tag > > |
| cnl::neg_inf_rounding_tag More...
|
|
struct | custom_operator< _impl::convert_op, op_value< Input, _impl::native_tag >, op_value< scaled_integer< ResultRep, power< ResultExponent, ResultRadix > >, tie_to_pos_inf_rounding_tag > > |
| cnl::tie_to_pos_inf_rounding_tag More...
|
|
struct | custom_operator< _impl::convert_op, op_value< Input, nearest_rounding_tag >, op_value< Result, power< 0, Radix > > > |
| cnl::nearest_rounding_tag More...
|
|
struct | fraction |
| numeric type represented as the fraction, numerator / denominator More...
|
|
struct | from_rep |
| generic function object that returns the number encapsulating a given value More...
|
|
struct | from_rep< Number, Rep > |
| Specialization of from_rep for integer types. More...
|
|
struct | from_rep< scaled_integer< ArchetypeRep, power< Exponent, Radix > >, Rep > |
| scaled_integer specialization of from_rep More...
|
|
struct | native_overflow_tag |
| tag to match the overflow behavior of fundamental arithmetic types More...
|
|
struct | native_rounding_tag |
| tag to match the rounding behavior of fundamental arithmetic types More...
|
|
struct | nearest_rounding_tag |
| tag to specify round-to-nearest behavior in arithemtic operations More...
|
|
struct | neg_inf_rounding_tag |
| tag to specify floor or round towards minus infinity rounding behavior in arithmetic operations More...
|
|
class | op_value |
| operand or result of operation;used as Operands parameter of custom_operator More...
|
|
struct | power |
| tag representing the scaling of an integer by a fixed factor More...
|
|
struct | rep_of |
| meta-function object that returns the Rep type of a component More...
|
|
struct | rounding |
| given a numeric type, defines member type as its rounding mode More...
|
|
struct | saturated_overflow_tag |
| tag to match the overflow behavior of fundamental arithmetic types More...
|
|
struct | set_digits |
| convert a type to a similar type with the given number of digits More...
|
|
struct | set_rep |
| meta-function object that transforms a component from one Rep type to another More...
|
|
struct | set_rep< elastic_integer< Digits, Narrowest >, Rep > |
| elastic_integer specialization of set_rep More...
|
|
struct | set_rounding |
| given a numeric type, defines member type as the equivalent type with the given rounding mode User-specializations of this type are permitted. More...
|
|
struct | set_tag |
| meta-function object that transforms a component from one Tag type to another More...
|
|
struct | set_tag< elastic_integer< Digits, Narrowest >, elastic_tag< NewDigits, NewNarrowest > > |
| elastic_integer specialization of set_tag More...
|
|
struct | tag_of |
| meta-function object that returns the Tag type of a component More...
|
|
struct | tie_to_pos_inf_rounding_tag |
| tag to specify tie to positive inf rounding behavior in arithmetic operations More...
|
|
struct | to_rep |
| Returns the value encapsulated in number . More...
|
|
struct | trapping_overflow_tag |
| tag to specify trap-on-overflow behavior in arithemtic operations More...
|
|
struct | undefined_overflow_tag |
| tag to specify undefined-behavior-on-overflow behavior in arithemtic operations More...
|
|
|
template<int Digits = digits_v<int>, integer Narrowest = int> |
using | elastic_integer = _impl::wrapper< typename elastic_tag< Digits, Narrowest >::rep, elastic_tag< Digits, Narrowest > > |
| An integer type with auto-widening operators. More...
|
|
template<int Digits, scaled_tag Scale = power<>, class Narrowest = signed> |
using | elastic_scaled_integer = scaled_integer< elastic_integer< Digits, Narrowest >, Scale > |
| literal real number approximation that uses fixed-point arithmetic and auto-widens to avoid overflow More...
|
|
template<unsigned NumDigits = digits_v<int>> |
using | multiprecision = signed_multiprecision< NumDigits > |
| alias to a signed, fixed-size Boost.Multiprecision type suitable for specializing scaled_integer More...
|
|
template<typename Rep = int, overflow_tag Tag = undefined_overflow_tag> |
using | overflow_integer = _impl::wrapper< Rep, Tag > |
| An integer for which out-of-range arithmetic results in overflow. More...
|
|
template<typename Rep = int, rounding_tag Tag = nearest_rounding_tag> |
using | rounding_integer = _impl::wrapper< Rep, Tag > |
| An integer which facilitates different rounding modes. More...
|
|
template<typename Number > |
using | rounding_t = typename rounding< Number >::type |
| helper alias of rounding More...
|
|
template<integer Rep = int, class Scale = power<>> |
using | scaled_integer = _impl::wrapper< Rep, Scale > |
| literal real number approximation that uses fixed-point arithmetic More...
|
|
template<class T , int Digits> |
using | set_digits_t = typename set_digits< T, Digits >::type |
| Alias to set_digits.
|
|
template<typename Number , rounding_tag RoundingTag> |
using | set_rounding_t = typename set_rounding< Number, RoundingTag >::type |
| helper alias of set_rounding More...
|
|
template<unsigned NumDigits = digits_v<int>> |
using | signed_multiprecision = _sized_integer_impl::number< NumDigits+1, _bmp::signed_magnitude > |
| alias to a signed, fixed-size Boost.Multiprecision type suitable for specializing scaled_integer More...
|
|
template<int Digits = digits_v<int>, rounding_tag RoundingTag = nearest_rounding_tag, overflow_tag OverflowTag = undefined_overflow_tag, class Narrowest = int> |
using | static_integer = _impl::static_integer< Digits, RoundingTag, OverflowTag, Narrowest > |
| a general-purpose integer type More...
|
|
template<int Digits, int Exponent = 0, rounding_tag RoundingTag = nearest_rounding_tag, overflow_tag OverflowTag = undefined_overflow_tag, integer Narrowest = int> |
using | static_number = scaled_integer< _impl::static_integer< Digits, RoundingTag, OverflowTag, Narrowest >, power< Exponent > > |
| a general-purpose fixed-point real number type More...
|
|
template<unsigned NumDigits = digits_v<unsigned>> |
using | unsigned_multiprecision = _sized_integer_impl::number< NumDigits, _bmp::unsigned_magnitude > |
| alias to an unsigned, fixed-size Boost.Multiprecision type suitable for specializing scaled_integer More...
|
|
template<int Digits = digits_v<int>, typename Narrowest = int> |
using | wide_integer = _impl::wrapper< typename wide_tag< Digits, Narrowest >::rep, wide_tag< Digits, Narrowest > > |
| An integer of limitless width.
|
|
|
template<typename Rep , class Scale > |
constexpr auto | abs (scaled_integer< Rep, Scale > const &x) noexcept -> decltype(-x) |
| absolute value More...
|
|
template<class Rep , int Exponent> |
constexpr auto | exp2 (scaled_integer< Rep, power< Exponent >> x) -> scaled_integer< Rep, power< Exponent >> |
| Calculates exp2(x), i.e. 2^xAccurate to 1LSB for up to 32 bit underlying representation. More...
|
|
template<typename Narrowest = int, ::cnl::intmax_t Value = 0> |
constexpr auto | make_elastic_scaled_integer (constant< Value >) -> elastic_scaled_integer< std::max(digits_v< constant< Value >> - trailing_bits(Value), 1), power< trailing_bits(Value)>, Narrowest > |
| generate an elastic_scaled_integer object of given value More...
|
|
template<typename Narrowest = void, typename Integral = int> |
constexpr auto | make_elastic_scaled_integer (Integral const &value) -> elastic_scaled_integer< std::numeric_limits< Integral >::digits, power<>, typename std::conditional< std::is_same< void, Narrowest >::value, _impl::adopt_signedness_t< int, Integral >, Narrowest >::type > |
| generate an elastic_scaled_integer object of given value More...
|
|
template<typename Value > |
constexpr auto | make_scaled_integer (Value const &value) |
| makes a scaled_integer object from a given value More...
|
|
template<rounding_tag RoundingTag = _impl::tag_of_t<rounding_integer<>>, overflow_tag OverflowTag = _impl::tag_of_t<overflow_integer<>>, integer Narrowest = int, class Input = int, ::cnl::intmax_t Value> |
constexpr auto | make_static_number (constant< Value > const &) -> static_number< _impl::used_digits(Value) - trailing_bits(Value), trailing_bits(Value), RoundingTag, OverflowTag, Narrowest > |
| constructs a static_number from a given constant value
|
|
template<rounding_tag RoundingTag = nearest_rounding_tag, overflow_tag OverflowTag = undefined_overflow_tag, integer Narrowest = int, class Input = int> |
constexpr auto | make_static_number (Input const &input) -> static_number< std::numeric_limits< Input >::digits, 0, RoundingTag, OverflowTag, Narrowest > |
| constructs a static_number from a given variable
|
|
template<int LhsExponent, int RhsExponent, int Radix> |
constexpr auto | operator+ (power< LhsExponent, Radix >, power< RhsExponent, Radix >) -> power< std::min(LhsExponent, RhsExponent), Radix > |
| value of template parameter, Exponent
|
|
template<class Dividend , class Divisor > |
constexpr auto | quotient (Dividend const ÷nd, Divisor const &divisor) |
| calculates the quotient of two scaled_integer values More...
|
|
template<int Digits, class Narrowest > |
constexpr auto | sqrt (elastic_integer< Digits, Narrowest > const &x) |
| elastic_integer overload of cnl::sqrt More...
|
|
template<integer Integer> |
constexpr auto | sqrt (Integer const &x) |
| integer overload of cnl::sqrt More...
|
|
template<typename Rep , int Exponent, int Radix> |
constexpr auto | sqrt (scaled_integer< Rep, power< Exponent, Radix >> const &x) |
| scaled_integer overload of cnl::sqrt More...
|
|
compositional numeric library