Arkulib
Functions
Arkulib::Tools Namespace Reference

Functions

template<typename OperatorType >
double OpApproximation (Arkulib::ERational<> r1, Arkulib::ERational<> r2, OperatorType operatorFunc)
 
template<typename FloatingType = double>
auto roundToWantedPrecision (const FloatingType value, const int precision=10e4)
 Round a number for a wanted precision (the digits) More...
 
template<typename Type >
std::string toStringWithPrecision (const Type value, const int precision=Arkulib::Constant::DEFAULT_COUT_ERATIONAL_DIGITS)
 Let the user set the precision while transforming a floating point to a string. More...
 
template<typename Type >
int getNumberLength (const Type value)
 Get the length on a number. More...
 

Function Documentation

◆ OpApproximation()

template<typename OperatorType >
double Arkulib::Tools::OpApproximation ( Arkulib::ERational<>  r1,
Arkulib::ERational<>  r2,
OperatorType  operatorFunc 
)

Definition at line 17 of file ERationalVerif.hpp.

◆ roundToWantedPrecision()

template<typename FloatingType = double>
auto Arkulib::Tools::roundToWantedPrecision ( const FloatingType  value,
const int  precision = 10e4 
)

Round a number for a wanted precision (the digits)

Template Parameters
FloatingType
Parameters
value
precision
Returns
A rounded value

Definition at line 24 of file Utils.hpp.

◆ toStringWithPrecision()

template<typename Type >
std::string Arkulib::Tools::toStringWithPrecision ( const Type  value,
const int  precision = Arkulib::Constant::DEFAULT_COUT_ERATIONAL_DIGITS 
)

Let the user set the precision while transforming a floating point to a string.

Template Parameters
Type
Parameters
value
precision
Returns
A string

Definition at line 36 of file Utils.hpp.

◆ getNumberLength()

template<typename Type >
int Arkulib::Tools::getNumberLength ( const Type  value)

Get the length on a number.

Template Parameters
Type
Parameters
value
Returns
The length

Definition at line 53 of file Utils.hpp.