Cppcheck
Functions
calculate.h File Reference
#include "mathlib.h"
#include "errortypes.h"
#include <limits>
#include <string>

Go to the source code of this file.

Functions

template<class T >
bool isEqual (T x, T y)
 
bool isEqual (double x, double y)
 
bool isEqual (float x, float y)
 
template<class T >
bool isZero (T x)
 
template<class R , class T >
calculate (const std::string &s, const T &x, const T &y, bool *error=nullptr)
 
template<class T >
calculate (const std::string &s, const T &x, const T &y, bool *error=nullptr)
 

Function Documentation

◆ calculate() [1/2]

template<class R , class T >
R calculate ( const std::string &  s,
const T &  x,
const T &  y,
bool *  error = nullptr 
)

Definition at line 50 of file calculate.h.

References MathLib::encodeMultiChar(), error, isEqual(), and isZero().

Referenced by evaluate(), infer(), and setTokenValue().

◆ calculate() [2/2]

template<class T >
T calculate ( const std::string &  s,
const T &  x,
const T &  y,
bool *  error = nullptr 
)

Definition at line 122 of file calculate.h.

References error.

◆ isEqual() [1/3]

bool isEqual ( double  x,
double  y 
)
inline

Definition at line 33 of file calculate.h.

◆ isEqual() [2/3]

bool isEqual ( float  x,
float  y 
)
inline

Definition at line 38 of file calculate.h.

References isEqual().

◆ isEqual() [3/3]

template<class T >
bool isEqual ( x,
y 
)

◆ isZero()

template<class T >
bool isZero ( x)

Definition at line 44 of file calculate.h.

References isEqual().

Referenced by calculate(), and isZeroBoundCond().