sigma  1.0.0
Loading...
Searching...
No Matches
numeric.hpp File Reference

Small numeric helpers shared across Sigma's representations. More...

#include <cmath>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  sigma
 The primary namespace for the sigma library.

Functions

template<typename U>
bool sigma::detail::is_integer_exponent (const U &exp)
 True if exp has no fractional part.

Detailed Description

Small numeric helpers shared across Sigma's representations.

Function Documentation

◆ 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
UThe type of the exponent.
Parameters
[in]expThe exponent to check.
Returns
True if exp is an integer, false otherwise.
Exceptions
noneNo throw guarantee.