sigma
1.0.0
Loading...
Searching...
No Matches
numeric.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <cmath>
3
#include <type_traits>
4
8
9
namespace
sigma::detail {
10
26
template
<
typename
U>
27
bool
is_integer_exponent
(
const
U&
exp
) {
28
using
clean_u_t = std::decay_t<U>;
29
if
constexpr
(std::is_floating_point_v<clean_u_t>) {
30
clean_u_t exp_int;
31
return
std::modf(
exp
, &exp_int) == U(0);
32
}
else
{
33
return
true
;
34
}
35
}
36
37
}
// namespace sigma::detail
sigma::exp
Affine< T > exp(const Affine< T > &a)
Calculate the exponential of an affine form.
Definition
exponents.ipp:31
sigma::detail::is_integer_exponent
bool is_integer_exponent(const U &exp)
True if exp has no fractional part.
Definition
numeric.hpp:27
include
sigma
detail
numeric.hpp
Generated by
1.16.1