24template<
typename IndexType,
typename ValueType>
28template<
typename RationalType>
34template<
typename ValueType>
36 typedef std::less<ValueType>
type;
41 return (a == 0.0 && b > 0.0) || (b - a > 1e-17);
50template<
typename ValueType>
52 typedef std::greater<ValueType>
type;
57 return (b == 0.0 && a > 0.0) || (a - b > 1e-17);
67template<
typename ValueType>
70template<
typename ValueType>
73template<
typename ValueType>
76template<
typename ValueType>
79template<
typename ValueType>
82template<
typename ValueType>
83bool isApproxEqual(ValueType
const& a, ValueType
const& b, ValueType
const& precision,
bool relative);
85template<
typename ValueType>
88template<
typename ValueType>
94template<
typename ValueType>
95bool isBetween(ValueType
const& a, ValueType
const& b, ValueType
const& c,
bool strict =
false);
97template<
typename ValueType>
98bool isOne(ValueType
const& a);
100template<
typename ValueType>
101bool isZero(ValueType
const& a);
103template<
typename ValueType>
104bool isNan(ValueType
const& a);
106template<
typename ValueType>
109template<
typename ValueType>
112template<
typename ValueType>
115template<
typename ValueType>
118template<
typename ValueType>
121template<
typename TargetType,
typename SourceType>
124template<
typename ValueType>
125std::pair<ValueType, ValueType>
asFraction(ValueType
const& number);
127template<
typename ValueType>
130template<
typename IndexType,
typename ValueType>
133template<
typename IndexType,
typename ValueType>
136template<
typename ValueType>
137std::pair<ValueType, ValueType>
minmax(std::vector<ValueType>
const& values);
139template<
typename ValueType>
140ValueType
minimum(std::vector<ValueType>
const& values);
142template<
typename ValueType>
143ValueType
maximum(std::vector<ValueType>
const& values);
145template<
typename K,
typename ValueType>
146std::pair<ValueType, ValueType>
minmax(std::map<K, ValueType>
const& values);
148template<
typename K,
typename ValueType>
149ValueType
minimum(std::map<K, ValueType>
const& values);
151template<
typename K,
typename ValueType>
152ValueType
maximum(std::map<K, ValueType>
const& values);
154template<
typename ValueType>
155ValueType
pow(ValueType
const& value, int_fast64_t exponent);
157template<
typename ValueType>
158ValueType
max(ValueType
const& first, ValueType
const& second);
160template<
typename ValueType>
161ValueType
min(ValueType
const& first, ValueType
const& second);
163template<
typename ValueType>
164ValueType
sqrt(ValueType
const& number);
166template<
typename ValueType>
167ValueType
abs(ValueType
const& number);
169template<
typename ValueType>
170ValueType
floor(ValueType
const& number);
172template<
typename ValueType>
173ValueType
ceil(ValueType
const& number);
175template<
typename ValueType>
176ValueType
round(ValueType
const& number);
178template<
typename ValueType>
179ValueType
log(ValueType
const& number);
181template<
typename ValueType>
182ValueType
log10(ValueType
const& number);
184template<
typename ValueType>
185ValueType
cos(ValueType
const& number);
187template<
typename ValueType>
188ValueType
sin(ValueType
const& number);
190template<
typename ValueType>
191uint64_t
numDigits(ValueType
const& number);
193template<
typename ValueType>
196template<
typename RationalType>
199template<
typename RationalType>
205template<
typename IntegerType>
206std::pair<IntegerType, IntegerType>
divide(IntegerType
const& dividend, IntegerType
const& divisor);
208template<
typename IntegerType>
209IntegerType
mod(IntegerType
const& first, IntegerType
const& second);
211template<
typename ValueType>
212std::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)
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)
std::pair< ValueType, ValueType > asFraction(ValueType const &number)
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)
bool isNan(ValueType const &)
std::string to_string(ValueType const &value)
std::pair< ValueType, ValueType > minmax(std::vector< ValueType > const &values)
typename detail::ElementLess< ValueType >::type ElementLess
typename detail::ElementGreater< ValueType >::type ElementGreater
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)
ValueType log10(ValueType const &number)
ValueType round(ValueType const &number)
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