9 T mean = std::abs(a.
mean());
10 T dcda = (a.
mean() >= 0) ? 1.0 : -1.0;
37 T mean = std::fmod(a.
mean(), b.
mean());
39 T dcdb = -std::floor(a.
mean() / b.
mean());
46 T mean = std::fmod(a.
mean(), b);
53 T mean = std::fmod(a, b.
mean());
54 T dcda = -std::floor(a / b.
mean());
63template<
typename T,
typename U>
65 auto b_sign = std::copysign(1.0, b);
66 T mean = std::copysign(a.
mean(), b);
67 T dcda = (a.
mean() >= 0) ? b_sign : -b_sign;
71template<
typename T,
typename U>
73 return std::copysign(a, b.
mean());
Models an unceratin variable.
Definition uncertain.hpp:34
value_t mean() const
Get the mean value of the variable.
Definition uncertain.hpp:71
value_t threshold() const
Access the zero threshold.
Definition uncertain.hpp:95
void inplace_binary(Uncertain< T > &c, const Uncertain< T > &b, T mean, T dcda, T dcdb)
Generalized Inplace Binary Changes.
Definition operation_common.hpp:61
Uncertain< T > unary_result(const Uncertain< T > &a, T mean, T dcda)
Generalized Unary Changes.
Definition operation_common.hpp:43
The primary namespace for the sigma library.
Definition affine.hpp:12
Affine< T > pow(const Affine< T > &a, const U &exp)
Calculate the power of an affine form.
Definition exponents.ipp:71
Affine< T > abs(const Affine< T > &a)
Absolute Value of an affine form.
Definition basic.ipp:8
Affine< T > fabs(const Affine< T > &a)
Absolute Value of an affine form.
Definition basic.ipp:25
Uncertain< T > round(const Uncertain< T > &a)
Round to the nearest integar, away from zero in halfway case.
Definition basic.ipp:82
Uncertain< T > floor(const Uncertain< T > &a)
Nearest integer not greater than the given value.
Definition basic.ipp:30
Uncertain< T > abs2(const Uncertain< T > &a)
The Square of the Absolute Value.
Definition basic.ipp:20
Uncertain< T > ceil(const Uncertain< T > &a)
Nearest integer not less than the given value.
Definition basic.ipp:25
Uncertain< T > copysign(const Uncertain< T > &a, const Uncertain< T > &b)
Copy the sign of one value to another.
Definition basic.ipp:59
Uncertain< T > trunc(const Uncertain< T > &a)
Remove the fractional part from a variable.
Definition basic.ipp:77
Uncertain< T > fmod(const Uncertain< T > &a, const Uncertain< T > &b)
Floating point module.
Definition basic.ipp:35
Common implementation details for operations.