12constexpr double pi = 3.14159265358979323846;
80template<
typename FunctionType,
typename NumericType>
83 auto step_size = std::sqrt(std::numeric_limits<float>::epsilon());
84 auto step = step_size * std::abs(a);
85 auto a_plus = f(a + step);
86 auto a_minus = f(a - step);
87 auto dcda = (a_plus - a_minus) / (2 * step);
Models an unceratin variable.
Definition uncertain.hpp:34
const deps_map_t & deps() const
Get the dependencies of the variable.
Definition uncertain.hpp:87
Modifies an unceratin variable.
Definition setter.hpp:20
void update_derivatives(value_t dxda)
Update of existing derivatives.
Definition setter.hpp:90
void update_mean(value_t mean)
Update the mean of the wrapped variable.
Definition setter.hpp:61
The namespace that contains the implementation details of the library.
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
void inplace_unary(Uncertain< T > &c, T mean, T dcda)
Generalized Inplace Unary Changes.
Definition operation_common.hpp:24
constexpr double pi
Value of Pi.
Definition operation_common.hpp:12
Uncertain< T > unary_result(const Uncertain< T > &a, T mean, T dcda)
Generalized Unary Changes.
Definition operation_common.hpp:43
NumericType numeric_derivative(FunctionType f, NumericType a)
Compute the numeric derivative of a function.
Definition operation_common.hpp:81
Defines the Setter class.
Defines the Uncertain class.