Small numeric helpers shared across Sigma's representations.
More...
#include <cmath>
#include <type_traits>
Go to the source code of this file.
|
| namespace | sigma |
| | The primary namespace for the sigma library.
|
Small numeric helpers shared across Sigma's representations.
◆ is_integer_exponent()
template<typename U>
| bool sigma::detail::is_integer_exponent |
( |
const U & | exp | ) |
|
True if exp has no fractional part.
Always true for an integral U. Used by pow() (Affine, Taylor, TaylorModel) to decide whether a zero-containing or negative-valued domain can be raised to exp at all – a negative base raised to a fractional power is not a real number.
- Template Parameters
-
| U | The type of the exponent. |
- Parameters
-
| [in] | exp | The exponent to check. |
- Returns
- True if
exp is an integer, false otherwise.
- Exceptions
-