#include "C_Integer.hh"#include <cerrno>#include <cstdlib>#include <climits>#include <string>

Go to the source code of this file.
Classes | |
| struct | Parma_Polyhedra_Library::Checked::Extended_Int< Policy, Type > |
| struct | Parma_Polyhedra_Library::Checked::Larger< char > |
| struct | Parma_Polyhedra_Library::Checked::Larger< signed char > |
| struct | Parma_Polyhedra_Library::Checked::Larger< unsigned char > |
| struct | Parma_Polyhedra_Library::Checked::Larger< signed short > |
| struct | Parma_Polyhedra_Library::Checked::Larger< unsigned short > |
| struct | Parma_Polyhedra_Library::Checked::Larger< signed int > |
| struct | Parma_Polyhedra_Library::Checked::Larger< unsigned int > |
| struct | Parma_Polyhedra_Library::Checked::Larger< signed long > |
| struct | Parma_Polyhedra_Library::Checked::Larger< unsigned long > |
| struct | Parma_Polyhedra_Library::Checked::Larger< signed long long > |
| struct | Parma_Polyhedra_Library::Checked::Larger< unsigned long long > |
Namespaces | |
| namespace | Parma_Polyhedra_Library |
The entire library is confined to this namespace. | |
| namespace | Parma_Polyhedra_Library::Checked |
Types and functions implementing checked numbers. | |
Defines | |
| #define | PPL_ASSIGN2_SIGNED_SIGNED(Smaller, Larger) |
| #define | PPL_ASSIGN2_UNSIGNED_UNSIGNED(Smaller, Larger) |
| #define | PPL_ASSIGN2_UNSIGNED_SIGNED(Smaller, Larger) |
| #define | PPL_ASSIGN2_SIGNED_UNSIGNED(Smaller, Larger) |
| #define | PPL_ASSIGN_SIGNED(Type) PPL_SPECIALIZE_ASSIGN(assign_signed_int_signed_int, Type, Type) |
| #define | PPL_ASSIGN_UNSIGNED(Type) PPL_SPECIALIZE_ASSIGN(assign_unsigned_int_unsigned_int, Type, Type) |
Typedefs | |
| typedef int16_t | Parma_Polyhedra_Library::Checked::int_fast16_t |
| typedef int32_t | Parma_Polyhedra_Library::Checked::int_fast32_t |
| typedef int64_t | Parma_Polyhedra_Library::Checked::int_fast64_t |
| typedef uint16_t | Parma_Polyhedra_Library::Checked::uint_fast16_t |
| typedef uint32_t | Parma_Polyhedra_Library::Checked::uint_fast32_t |
| typedef uint64_t | Parma_Polyhedra_Library::Checked::uint_fast64_t |
Functions | |
| signed long long | strtoll (const char *nptr, char **endptr, int base) |
| unsigned long long | strtoull (const char *nptr, char **endptr, int base) |
| template<typename Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::set_neg_overflow_int (To &to, Rounding_Dir dir) |
| template<typename Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::set_pos_overflow_int (To &to, Rounding_Dir dir) |
| template<typename Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::round_lt_int_no_overflow (To &to, Rounding_Dir dir) |
| template<typename Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::round_gt_int_no_overflow (To &to, Rounding_Dir dir) |
| template<typename Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::round_lt_int (To &to, Rounding_Dir dir) |
| template<typename Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::round_gt_int (To &to, Rounding_Dir dir) |
| template<typename Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::classify_int (const Type v, bool nan, bool inf, bool sign) |
| template<typename Policy , typename Type > | |
| bool | Parma_Polyhedra_Library::Checked::is_nan_int (const Type v) |
| template<typename Policy , typename Type > | |
| bool | Parma_Polyhedra_Library::Checked::is_minf_int (const Type v) |
| template<typename Policy , typename Type > | |
| bool | Parma_Polyhedra_Library::Checked::is_pinf_int (const Type v) |
| template<typename Policy , typename Type > | |
| bool | Parma_Polyhedra_Library::Checked::is_int_int (const Type v) |
| template<typename Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::assign_special_int (Type &v, Result_Class c, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To , typename From > | |
| Result | Parma_Polyhedra_Library::Checked::assign_signed_int_signed_int (To &to, const From from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To , typename From > | |
| Result | Parma_Polyhedra_Library::Checked::assign_signed_int_unsigned_int (To &to, const From from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To , typename From > | |
| Result | Parma_Polyhedra_Library::Checked::assign_unsigned_int_signed_int (To &to, const From from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To , typename From > | |
| Result | Parma_Polyhedra_Library::Checked::assign_unsigned_int_unsigned_int (To &to, const From from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To , typename From > | |
| Result | Parma_Polyhedra_Library::Checked::assign_int_float (To &to, const From from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::assign_signed_int_mpz (To &to, const mpz_class &from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::assign_unsigned_int_mpz (To &to, const mpz_class &from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename To > | |
| Result | Parma_Polyhedra_Library::Checked::assign_int_mpq (To &to, const mpq_class &from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::neg_int_larger (Type &to, const Type x, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::add_int_larger (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sub_int_larger (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::mul_int_larger (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::neg_signed_int (Type &to, const Type from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::neg_unsigned_int (Type &to, const Type from, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::add_signed_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::add_unsigned_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sub_signed_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sub_unsigned_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::mul_signed_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::mul_unsigned_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::div_signed_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::div_unsigned_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::idiv_signed_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::idiv_unsigned_int (Type &to, const Type x, const Type y, Rounding_Dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::rem_signed_int (Type &to, const Type x, const Type y, Rounding_Dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::rem_unsigned_int (Type &to, const Type x, const Type y, Rounding_Dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::div_2exp_unsigned_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::div_2exp_signed_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::add_2exp_unsigned_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::add_2exp_signed_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sub_2exp_unsigned_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sub_2exp_signed_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::mul_2exp_unsigned_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::mul_2exp_signed_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::smod_2exp_unsigned_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::smod_2exp_signed_int (Type &to, const Type x, unsigned int exp, Rounding_Dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::umod_2exp_unsigned_int (Type &to, const Type x, unsigned int exp, Rounding_Dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::umod_2exp_signed_int (Type &to, const Type x, unsigned int exp, Rounding_Dir dir) |
| template<typename Type > | |
| void | Parma_Polyhedra_Library::Checked::isqrtrem (Type &q, Type &r, const Type from) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sqrt_unsigned_int (Type &to, const Type from, Rounding_Dir dir) |
| template<typename To_Policy , typename From_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sqrt_signed_int (Type &to, const Type from, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::add_mul_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename To_Policy , typename From1_Policy , typename From2_Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::sub_mul_int (Type &to, const Type x, const Type y, Rounding_Dir dir) |
| template<typename Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::output_char (std::ostream &os, Type &from, const Numeric_Format &, Rounding_Dir) |
| template<typename Policy , typename Type > | |
| Result | Parma_Polyhedra_Library::Checked::output_int (std::ostream &os, Type &from, const Numeric_Format &, Rounding_Dir) |
| #define PPL_ASSIGN2_SIGNED_SIGNED | ( | Smaller, | |||
| Larger | ) |
PPL_SPECIALIZE_ASSIGN(assign_signed_int_signed_int, Smaller, Larger) \ PPL_SPECIALIZE_ASSIGN(assign_signed_int_signed_int, Larger, Smaller)
Definition at line 409 of file checked_int.inlines.hh.
| #define PPL_ASSIGN2_SIGNED_UNSIGNED | ( | Smaller, | |||
| Larger | ) |
PPL_SPECIALIZE_ASSIGN(assign_signed_int_unsigned_int, Smaller, Larger) \ PPL_SPECIALIZE_ASSIGN(assign_unsigned_int_signed_int, Larger, Smaller)
Definition at line 421 of file checked_int.inlines.hh.
| #define PPL_ASSIGN2_UNSIGNED_SIGNED | ( | Smaller, | |||
| Larger | ) |
PPL_SPECIALIZE_ASSIGN(assign_unsigned_int_signed_int, Smaller, Larger) \ PPL_SPECIALIZE_ASSIGN(assign_signed_int_unsigned_int, Larger, Smaller)
Definition at line 417 of file checked_int.inlines.hh.
| #define PPL_ASSIGN2_UNSIGNED_UNSIGNED | ( | Smaller, | |||
| Larger | ) |
PPL_SPECIALIZE_ASSIGN(assign_unsigned_int_unsigned_int, Smaller, Larger) \ PPL_SPECIALIZE_ASSIGN(assign_unsigned_int_unsigned_int, Larger, Smaller)
Definition at line 413 of file checked_int.inlines.hh.
| #define PPL_ASSIGN_SIGNED | ( | Type | ) | PPL_SPECIALIZE_ASSIGN(assign_signed_int_signed_int, Type, Type) |
Definition at line 425 of file checked_int.inlines.hh.
| #define PPL_ASSIGN_UNSIGNED | ( | Type | ) | PPL_SPECIALIZE_ASSIGN(assign_unsigned_int_unsigned_int, Type, Type) |
Definition at line 427 of file checked_int.inlines.hh.
| signed long long strtoll | ( | const char * | nptr, | |
| char ** | endptr, | |||
| int | base | |||
| ) |
| unsigned long long strtoull | ( | const char * | nptr, | |
| char ** | endptr, | |||
| int | base | |||
| ) |
1.6.3