22template<
typename IndexType,
typename ValueType>
26template<
typename RationalType>
32template<
typename ValueType>
34 typedef std::less<ValueType>
type;
39 return (a == 0.0 && b > 0.0) || (b - a > 1e-17);
48template<
typename ValueType>
50 typedef std::greater<ValueType>
type;
55 return (b == 0.0 && a > 0.0) || (a - b > 1e-17);
65template<
typename ValueType>
68template<
typename ValueType>
71template<
typename ValueType>
74template<
typename ValueType>
77template<
typename ValueType>
80template<
typename ValueType>
81bool isApproxEqual(ValueType
const& a, ValueType
const& b, ValueType
const& precision,
bool relative);
83template<
typename ValueType>
86template<
typename ValueType>
92template<
typename ValueType>
93bool isBetween(ValueType
const& a, ValueType
const& b, ValueType
const& c,
bool strict =
false);
95template<
typename ValueType>
96bool isOne(ValueType
const& a);
98template<
typename ValueType>
99bool isZero(ValueType
const& a);
101template<
typename ValueType>
102bool isNan(ValueType
const& a);
104template<
typename ValueType>
107template<
typename ValueType>
110template<
typename ValueType>
113template<
typename ValueType>
116template<
typename ValueType>
119template<
typename TargetType,
typename SourceType>
129template<
typename RationalType>
132template<
typename ValueType>
135template<
typename IndexType,
typename ValueType>
138template<
typename IndexType,
typename ValueType>
141template<
typename ValueType>
142std::pair<ValueType, ValueType>
minmax(std::vector<ValueType>
const& values);
144template<
typename ValueType>
145ValueType
minimum(std::vector<ValueType>
const& values);
147template<
typename ValueType>
148ValueType
maximum(std::vector<ValueType>
const& values);
150template<
typename K,
typename ValueType>
151std::pair<ValueType, ValueType>
minmax(std::map<K, ValueType>
const& values);
153template<
typename K,
typename ValueType>
154ValueType
minimum(std::map<K, ValueType>
const& values);
156template<
typename K,
typename ValueType>
157ValueType
maximum(std::map<K, ValueType>
const& values);
159template<
typename ValueType>
160ValueType
pow(ValueType
const& value, int_fast64_t exponent);
162template<
typename ValueType>
163ValueType
max(ValueType
const& first, ValueType
const& second);
165template<
typename ValueType>
166ValueType
min(ValueType
const& first, ValueType
const& second);
168template<
typename ValueType>
169ValueType
sqrt(ValueType
const& number);
171template<
typename ValueType>
172ValueType
abs(ValueType
const& number);
174template<
typename ValueType>
175ValueType
floor(ValueType
const& number);
177template<
typename ValueType>
178ValueType
ceil(ValueType
const& number);
180template<
typename ValueType>
181ValueType
round(ValueType
const& number);
183template<
typename ValueType>
184ValueType
log(ValueType
const& number);
186template<
typename ValueType>
187ValueType
log10(ValueType
const& number);
189template<
typename ValueType>
190ValueType
cos(ValueType
const& number);
192template<
typename ValueType>
193ValueType
sin(ValueType
const& number);
195template<
typename ValueType>
196uint64_t
numDigits(ValueType
const& number);
201template<
typename ValueType>
202uint64_t
bitsize(ValueType
const& number);
204template<
typename ValueType>
207template<
typename RationalType>
210template<
typename RationalType>
216template<
typename IntegerType>
219template<
typename IntegerType>
222template<
typename IntegerType>
225template<
typename IntegerType>
228template<
typename ValueType>
229std::string
to_string(ValueType
const& value);
ValueType max(ValueType const &first, ValueType const &second)
bool isPositive(ValueType const &a)
bool isOne(ValueType const &a)
NumberTraits< RationalType >::IntegerType denominator(RationalType const &number)
typename detail::ElementGreater< ValueType >::type ElementGreater
NumberTraits< RationalType >::IntegerType numerator(RationalType const &number)
bool isConstant(ValueType const &)
ValueType simplify(ValueType value)
bool isBetween(ValueType const &a, ValueType const &b, ValueType const &c, bool strict)
Compare whether a <= b <= c or a < b < c, based on the strictness parameter.
ValueType min(ValueType const &first, ValueType const &second)
ValueType sin(ValueType const &number)
bool isApproxEqual(ValueType const &a, ValueType const &b, ValueType const &precision, bool relative)
bool isAlmostZero(ValueType const &a)
bool isAlmostOne(ValueType const &a)
ValueType floor(ValueType const &number)
IntegerType lcm(IntegerType const &first, IntegerType const &second)
bool isZero(ValueType const &a)
ValueType minimum(std::vector< ValueType > const &values)
ValueType ceil(ValueType const &number)
bool isInteger(ValueType const &number)
ValueType abs(ValueType const &number)
IntegerType gcd(IntegerType const &first, IntegerType const &second)
bool isNan(ValueType const &)
std::string to_string(ValueType const &value)
std::pair< ValueType, ValueType > minmax(std::vector< ValueType > const &values)
bool isNonNegative(ValueType const &a)
NumberTraits< ValueType >::IntegerType trunc(ValueType const &number)
std::pair< IntegerType, IntegerType > divide(IntegerType const ÷nd, IntegerType const &divisor)
(Integer-)Divides the dividend by the divisor and returns the result plus the remainder.
IntegerType mod(IntegerType const &first, IntegerType const &second)
ValueType pow(ValueType const &value, int_fast64_t exponent)
ValueType log(ValueType const &number)
ValueType maximum(std::vector< ValueType > const &values)
ValueType cos(ValueType const &number)
ValueType sqrt(ValueType const &number)
uint64_t numDigits(ValueType const &number)
bool isInfinity(ValueType const &a)
uint64_t bitsize(ValueType const &number)
Returns the minimum number of bits to represent the given number.
typename detail::ElementLess< ValueType >::type ElementLess
ValueType log10(ValueType const &number)
ValueType round(ValueType const &number)
bool tryParseNumber(std::string const &input, RationalType &result)
Tries to parse a number from its string representation.
TargetType convertNumber(SourceType const &number)
bool operator()(double a, double b) const
bool operator()(double a, double b) const
std::greater< ValueType > type
std::less< ValueType > type