VCCC  2024.05
VisualCamp Common C++ library
math

Mathematics libraries. More...

Detailed Description

Modules

 (constants)
 
 matrix
 Matrix implemented with expression template
 
 gradient
 calculates gradient value of the given function and variables
 

Functions

template<typename T >
epsilon ()
 Get machine epsilon for the given type. More...
 
template<std::size_t i, typename Tuple , typename T >
constexpr auto addEpsilon (Tuple vars, T epsilon)
 Increase the value by small amount. More...
 

Function Documentation

◆ addEpsilon()

constexpr auto vccc::addEpsilon ( Tuple  vars,
epsilon 
)
inlineconstexpr
Template Parameters
T
U
Parameters
x
eps
Returns

◆ epsilon()

T vccc::epsilon ( )
inline

std::numeric_limits<T>epsilon() can't be directly used in a mathematical equations.
Machine epsilon is an upper bound on the relative approximation error due to the rounding in floating point arithmetic.

Template Parameters
Ttype
Returns
machine epsilon of T

\( {\large \sqrt[3]{e} }\)