10 T mean = std::abs(a.
mean());
11 T dcda = (a.
mean() >= 0) ? 1.0 : -1.0;
22 auto result = boost::numeric::abs(
23 boost::numeric::interval<T>(a.
lower(), a.
upper()));
49 T mean = std::fmod(a.
mean(), b.
mean());
51 T dcdb = -std::floor(a.
mean() / b.
mean());
57 T mean = std::fmod(a.
mean(), b);
64 T mean = std::fmod(a, b.
mean());
65 T dcda = -std::floor(a / b.
mean());
74template<
typename T,
typename U>
76 auto b_sign = std::copysign(1.0, b);
77 T mean = std::copysign(a.
mean(), b);
78 T dcda = (a.
mean() >= 0) ? b_sign : -b_sign;
82template<
typename T,
typename U>
84 return std::copysign(a, b.
mean());
Models a numeric interval.
Definition interval.hpp:21
value_t upper() const
Returns the upper bound of the interval.
Definition interval.hpp:67
value_t lower() const
Returns the lower bound of the interval.
Definition interval.hpp:59
Models an unceratin variable.
Definition uncertain.hpp:33
value_t mean() const
Get the mean value of the variable.
Definition uncertain.hpp:82
Uncertain< T > unary_result(const Uncertain< T > &a, T mean, T dcda)
Generalized Unary Changes.
Definition operation_common.hpp:44
Uncertain< T > binary_result(const Uncertain< T > &a, const Uncertain< T > &b, T mean, T dcda, T dcdb)
Generalized Binary Changes.
Definition operation_common.hpp:85
The primary namespace for the sigma library.
Definition operation_common.hpp:10
Uncertain< T > round(const Uncertain< T > &a)
Round to the nearest integar, away from zero in halfway case.
Definition basic.ipp:93
Uncertain< T > floor(const Uncertain< T > &a)
Nearest integer not greater than the given value.
Definition basic.ipp:43
Uncertain< T > abs2(const Uncertain< T > &a)
The Square of the Absolute Value.
Definition basic.ipp:33
Uncertain< T > ceil(const Uncertain< T > &a)
Nearest integer not less than the given value.
Definition basic.ipp:38
Uncertain< T > pow(const Uncertain< T > &a, const U &exp)
Exponentiation of a variable.
Definition exponents.ipp:10
Uncertain< T > fabs(const Uncertain< T > &a)
Absolute Value.
Definition basic.ipp:16
Uncertain< T > copysign(const Uncertain< T > &a, const Uncertain< T > &b)
Copy the sign of one value to another.
Definition basic.ipp:70
Uncertain< T > abs(const Uncertain< T > &a)
Absolute Value.
Definition basic.ipp:9
Uncertain< T > trunc(const Uncertain< T > &a)
Remove the fractional part from a variable.
Definition basic.ipp:88
Uncertain< T > fmod(const Uncertain< T > &a, const Uncertain< T > &b)
Floating point module.
Definition basic.ipp:48
Common implementation details for operations.