13constexpr double pi = 3.14159265358979323846;
103template<
typename FunctionType,
typename NumericType>
106 auto step_size = std::sqrt(std::numeric_limits<float>::epsilon());
107 auto step = step_size * std::abs(a);
108 auto a_plus = f(a + step);
109 auto a_minus = f(a - step);
110 auto dcda = (a_plus - a_minus) / (2 * step);
Models an unceratin variable.
Definition uncertain.hpp:33
const deps_map_t & deps() const
Get the dependencies of the variable.
Definition uncertain.hpp:98
Modifies an unceratin variable.
Definition setter.hpp:19
void update_derivatives(value_t dxda, bool call_update_std=true)
Update of existing derivatives.
Definition setter.hpp:84
void update_mean(value_t mean)
Update the mean of the wrapped variable.
Definition setter.hpp:53
The namespace that contains the implementation details of the library.
Definition operation_common.hpp:10
void inplace_binary(Uncertain< T > &c, const Uncertain< T > &b, T mean, T dcda, T dcdb)
Generalized Inplace Binary Changes.
Definition operation_common.hpp:62
void inplace_unary(Uncertain< T > &c, T mean, T dcda)
Generalized Inplace Unary Changes.
Definition operation_common.hpp:25
constexpr double pi
Value of Pi.
Definition operation_common.hpp:13
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
NumericType numeric_derivative(FunctionType f, NumericType a)
Compute the numeric derivative of a function.
Definition operation_common.hpp:104
Defines the Setter class.
Defines the Uncertain class.