Steppable 0.0.1
A CAS project written from scratch in C++
Loading...
Searching...
No Matches
steppable::__internals::calc Namespace Reference

Classes

struct  QuotientRemainder
 Represents the quotient and remainder of a division operation. More...
 
struct  Surd
 A struct to represent a surd. A surd is a number that cannot be simplified to remove a square root. It is expressed as $(a\sqrt[n]{b})$. More...
 

Functions

std::string representNumber (const std::string &_number)
 Represents a number using alphabets and numberals.
 
std::string baseConvert (const std::string &_number, const std::string &baseStr, int steps=2)
 Converts a string representation of a number from decimal to another one.
 
std::string toNumber (const char _input)
 Converts a numeral character to a number string.
 
std::string decimalConvert (const std::string &_inputString, const std::string &baseString, int steps=2)
 Converts a string representation of a number from any base to decimal.
 
types::Result< Number_abs (const std::string &_number)
 
std::string abs (const std::string &_number, int steps)
 Calculates the absolute value of a string representation of a number.
 
std::string add (const std::string &a, const std::string &b, int steps=2, bool negative=false, bool properlyFormat=true)
 Adds two string representations of numbers, and performs with the column method.
 
std::string atan2 (const std::string &y, const std::string &x, const size_t decimals=10)
 
std::string compare (const std::string &_a, const std::string &_b, int steps=2)
 Compares two string representations of numbers.
 
QuotientRemainder getQuotientRemainder (const auto &_currentRemainder, const auto &divisor)
 
long long determineResultScale (const std::string &_number, const std::string &_divisor)
 Determines the scale of the quotient of division.
 
std::string divide (const std::string &number, const std::string &divisor, int steps=2, int decimals=5)
 Divides a string representation of a number by another string representation of a number.
 
QuotientRemainder divideWithQuotient (const std::string &number, const std::string &divisor)
 
std::string getGCD (const std::string &_a, const std::string &_b)
 Gets the greatest common divisor of two string representations of numbers.
 
std::string factorial (const std::string &_number, int steps=2)
 Calculates the factorial of a number.
 
std::string sinh (const std::string &x, int decimals)
 Hyperbolic sine function.
 
std::string cosh (const std::string &x, int decimals)
 Hyperbolic cosine function.
 
std::string tanh (const std::string &x, int decimals)
 Hyperbolic tangent function.
 
std::string coth (const std::string &x, int decimals)
 Hyperbolic tangent function.
 
std::string csch (const std::string &x, int decimals)
 Hyperbolic tangent function.
 
std::string sech (const std::string &x, int decimals)
 Hyperbolic tangent function.
 
std::string asinh (const std::string &x, int decimals)
 Inverse hyperbolic sine function.
 
std::string acosh (const std::string &x, int decimals)
 Inverse hyperbolic cosine function.
 
std::string atanh (const std::string &x, int decimals)
 Inverse hyperbolic tangent function.
 
std::string acoth (const std::string &x, int decimals)
 Inverse hyperbolic cotangent function.
 
std::string acsch (const std::string &x, int decimals)
 Inverse hyperbolic cosecant function.
 
std::string asech (const std::string &x, int decimals)
 Inverse hyperbolic secant function.
 
std::string _log (const std::string &x, const size_t _decimals)
 
std::string logb (const std::string &_number, const std::string &_base, size_t _decimals)
 Calculates the logarithm with a given base.
 
std::string log10 (const std::string &_number, size_t _decimals)
 Calculates the common logarithm of a number.
 
std::string log2 (const std::string &_number, size_t _decimals)
 Calculates the binary logarithm of a number.
 
std::string ln (const std::string &_number, size_t _decimals)
 Calculates the natural logarithm of a number.
 
std::string multiply (const std::string &a, const std::string &b, int steps=2, int decimals=MAX_DECIMALS)
 Multiplies two string representations of numbers.
 
std::string power (const std::string &_number, const std::string &raiseTo, int steps=2, int decimals=8)
 Raises a string representation of a number to a power.
 
std::string exp (const std::string &x, size_t decimals=10)
 Calculates e^x. Shorthand of power(x, E, 0);.
 
std::string rootIntPart (const std::string &_number, const std::string &base)
 Gets the integer part of the root of a number.
 
Surd rootSurd (const std::string &_number, const std::string &base)
 Converts a root operation into a surd.
 
std::string _root (const std::string &_number, const std::string &base, const size_t _decimals, const int steps)
 
std::string root (const std::string &_number, const std::string &base, size_t decimals=8, int steps=0)
 Takes the n-th root of a numer.
 
std::string subtract (const std::string &a, const std::string &b, int steps=2, bool noMinus=false)
 Subtracts one string representation of a number from another string representation of a number.
 
std::string degToRad (const std::string &_deg)
 Converts degrees to radians.
 
std::string gradToRad (const std::string &_grad)
 Converts gradians to radians.
 
std::string radToDeg (const std::string &_rad, const int decimals)
 
std::string radToGrad (const std::string &_rad, const int decimals)
 
std::string gradToDeg (const std::string &_grad)
 
std::string _cos (const std::string &x, const int _decimals)
 
std::string cos (const std::string &x, int decimals, int mode=0)
 Calculates the cosine of a number.
 
std::string sin (const std::string &x, int decimals, int mode=0)
 Calculates the sine of a number.
 
std::string tan (const std::string &x, int decimals, int mode=0)
 Calculates the tangent of a number.
 
std::string csc (const std::string &x, int decimals, int mode=0)
 Calculates the cosecant of a number.
 
std::string sec (const std::string &x, int decimals, int mode=0)
 Calculates the secant of a number.
 
std::string cot (const std::string &x, int decimals, int mode=0)
 Calculates the cotangent of a number.
 
std::string atan (const std::string &x, int decimals, int mode=0)
 Calculates the arc tangent of a number.
 
std::string asin (const std::string &x, int decimals, int mode=0)
 Calculates the arc sine of a number.
 
std::string acos (const std::string &x, int decimals, int mode=0)
 Calculates the arc cosine of a number.
 
std::string asec (const std::string &x, int decimals, int mode=0)
 Calculates the arc secant of a number.
 
std::string acsc (const std::string &x, int decimals, int mode=0)
 Calculates the arc cosecant of a number.
 
std::string acot (const std::string &x, int decimals, int mode=0)
 Calculates the arc cotangent of a number.
 
template<typename Pred>
void loop (const std::string &times, Pred predicate)
 Executes a given predicate function a specified number of times.
 

Function Documentation

◆ _abs()

types::Result< Number > steppable::__internals::calc::_abs ( const std::string & _number)
Here is the caller graph for this function:

◆ _cos()

std::string steppable::__internals::calc::_cos ( const std::string & x,
const int _decimals )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _log()

std::string steppable::__internals::calc::_log ( const std::string & x,
const size_t _decimals )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _root()

std::string steppable::__internals::calc::_root ( const std::string & _number,
const std::string & base,
const size_t _decimals,
const int steps )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ abs()

std::string steppable::__internals::calc::abs ( const std::string & _number,
int steps )

Calculates the absolute value of a string representation of a number.

Parameters
[in]_numberThe string representation of the number.
[in]stepsThe number of steps to perform the calculation.
Returns
The absolute value of the number as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ acos()

std::string steppable::__internals::calc::acos ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the arc cosine of a number.

Parameters
xThe number to calculate the arc cosine of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the arc cosine in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The arc cosine of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ acosh()

std::string steppable::__internals::calc::acosh ( const std::string & x,
int decimals )

Inverse hyperbolic cosine function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The inverse hyperbolic cosine of the number.
Here is the call graph for this function:

◆ acot()

std::string steppable::__internals::calc::acot ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the arc cotangent of a number.

Parameters
xThe number to calculate the arc cotangent of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the arc cotangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The arc cotangent of the number.
Here is the call graph for this function:

◆ acoth()

std::string steppable::__internals::calc::acoth ( const std::string & x,
int decimals )

Inverse hyperbolic cotangent function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The inverse hyperbolic cotangent of the number.
Here is the call graph for this function:

◆ acsc()

std::string steppable::__internals::calc::acsc ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the arc cosecant of a number.

Parameters
xThe number to calculate the arc cosecant of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the arc cosecant in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The arc cosecant of the number.
Here is the call graph for this function:

◆ acsch()

std::string steppable::__internals::calc::acsch ( const std::string & x,
int decimals )

Inverse hyperbolic cosecant function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The inverse hyperbolic cosecant of the number.
Here is the call graph for this function:

◆ add()

std::string steppable::__internals::calc::add ( const std::string & a,
const std::string & b,
int steps = 2,
bool negative = false,
bool properlyFormat = true )

Adds two string representations of numbers, and performs with the column method.

Parameters
[in]aThe first string representation of the number.
[in]bThe second string representation of the number.
[in]stepsThe number of steps to perform the addition. 2 = column method, 1 = normal addition, 0 = result only. Default is 2.
[in]negativeFlag indicating whether the result should be negative.
[in]properlyFormatFlag indicating whether to properly format the output. Default true.
Returns
The sum of the two numbers as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ asec()

std::string steppable::__internals::calc::asec ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the arc secant of a number.

Parameters
xThe number to calculate the arc secant of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the arc secant in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The arc secant of the number.
Here is the call graph for this function:

◆ asech()

std::string steppable::__internals::calc::asech ( const std::string & x,
int decimals )

Inverse hyperbolic secant function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The inverse hyperbolic secant of the number.
Here is the call graph for this function:

◆ asin()

std::string steppable::__internals::calc::asin ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the arc sine of a number.

Parameters
xThe number to calculate the arc sine of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the arc sine in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The arc sine of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ asinh()

std::string steppable::__internals::calc::asinh ( const std::string & x,
int decimals )

Inverse hyperbolic sine function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The inverse hyperbolic sine of the number.
Here is the call graph for this function:

◆ atan()

std::string steppable::__internals::calc::atan ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the arc tangent of a number.

Parameters
xThe number to calculate the arc tangent of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the arc tangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The arc tangent of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atan2()

std::string steppable::__internals::calc::atan2 ( const std::string & y,
const std::string & x,
const size_t decimals = 10 )
Here is the call graph for this function:

◆ atanh()

std::string steppable::__internals::calc::atanh ( const std::string & x,
int decimals )

Inverse hyperbolic tangent function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The inverse hyperbolic tangent of the number.
Here is the call graph for this function:

◆ baseConvert()

std::string steppable::__internals::calc::baseConvert ( const std::string & _number,
const std::string & baseStr,
int steps = 2 )

Converts a string representation of a number from decimal to another one.

Parameters
[in]_numberThe string representation of the number.
[in]baseStrThe desired base.
[in]stepsThe number of steps to perform the conversion.
Returns
The converted number as a string.
Here is the call graph for this function:

◆ compare()

std::string steppable::__internals::calc::compare ( const std::string & _a,
const std::string & _b,
int steps = 2 )

Compares two string representations of numbers.

Parameters
[in]_aThe first string representation of the number.
[in]_bThe second string representation of the number.
[in]stepsThe number of steps to perform the comparison.
Returns
A string indicating the result of the comparison: "2" if a and b are equal, "1" if a is greater than b, "0" if a is less than b.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cos()

std::string steppable::__internals::calc::cos ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the cosine of a number.

Parameters
xThe number to calculate the cosine of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the cosine in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The cosine of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cosh()

std::string steppable::__internals::calc::cosh ( const std::string & x,
int decimals )

Hyperbolic cosine function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The hyperbolic cosine of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cot()

std::string steppable::__internals::calc::cot ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the cotangent of a number.

Parameters
xThe number to calculate the cotangent of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the cotangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The cotangent of the number.
Here is the call graph for this function:

◆ coth()

std::string steppable::__internals::calc::coth ( const std::string & x,
int decimals )

Hyperbolic tangent function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The hyperbolic tangent of the number.
Here is the call graph for this function:

◆ csc()

std::string steppable::__internals::calc::csc ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the cosecant of a number.

Parameters
xThe number to calculate the cosecant of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the cosecant in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The cosecant of the number.
Here is the call graph for this function:

◆ csch()

std::string steppable::__internals::calc::csch ( const std::string & x,
int decimals )

Hyperbolic tangent function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The hyperbolic tangent of the number.
Here is the call graph for this function:

◆ decimalConvert()

std::string steppable::__internals::calc::decimalConvert ( const std::string & _inputString,
const std::string & baseString,
int steps = 2 )

Converts a string representation of a number from any base to decimal.

Parameters
[in]_inputStringThe string representation of the number.
[in]baseStringThe base of the input number.
[in]stepsThe number of steps to perform the conversion.
Returns
The converted number as a string.
Here is the call graph for this function:

◆ degToRad()

std::string steppable::__internals::calc::degToRad ( const std::string & _deg)

Converts degrees to radians.

Parameters
_degThe angle expressed in degrees.
Returns
The equivalent angle in radians.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ determineResultScale()

long long steppable::__internals::calc::determineResultScale ( const std::string & _number,
const std::string & _divisor )

Determines the scale of the quotient of division.

Parameters
[in]_numberThe number to be divided.
[in]_divisorThe divisor of the division.
Returns
The scale of the result.
See also
https://worldmentalcalculation.com/how-to-divide-by-long-numbers-in-mental-math/
Here is the call graph for this function:
Here is the caller graph for this function:

◆ divide()

std::string steppable::__internals::calc::divide ( const std::string & number,
const std::string & divisor,
int steps = 2,
int decimals = 5 )

Divides a string representation of a number by another string representation of a number.

Parameters
[in]numberThe string representation of the dividend.
[in]divisorThe string representation of the divisor.
[in]stepsThe number of steps to perform the division.
[in]decimalsThe number of decimal places in the result.
Returns
The quotient of the division as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ divideWithQuotient()

QuotientRemainder steppable::__internals::calc::divideWithQuotient ( const std::string & number,
const std::string & divisor )

Calculates the quotient and remainder of dividing the current remainder by the divisor.

Parameters
[in]numberThe number.
[in]divisorThe divisor.
Returns
A QuotientRemainder object containing the quotient and remainder.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exp()

std::string steppable::__internals::calc::exp ( const std::string & x,
size_t decimals = 10 )

Calculates e^x. Shorthand of power(x, E, 0);.

Parameters
xThe string representation of the number.
decimalsThe number of decimals to output.
Returns
The exponent of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ factorial()

std::string steppable::__internals::calc::factorial ( const std::string & _number,
int steps = 2 )

Calculates the factorial of a number.

Parameters
_numberThe number to calculate the factorial of.
stepsThe number of steps to calculate the factorial.
Returns
The factorial of the number.
Here is the call graph for this function:

◆ getGCD()

std::string steppable::__internals::calc::getGCD ( const std::string & _a,
const std::string & _b )

Gets the greatest common divisor of two string representations of numbers.

Parameters
_aNumber 1.
_bNumber 2.
Returns
The greatest common divisor of the two numbers.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getQuotientRemainder()

QuotientRemainder steppable::__internals::calc::getQuotientRemainder ( const auto & _currentRemainder,
const auto & divisor )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gradToDeg()

std::string steppable::__internals::calc::gradToDeg ( const std::string & _grad)
Here is the call graph for this function:

◆ gradToRad()

std::string steppable::__internals::calc::gradToRad ( const std::string & _grad)

Converts gradians to radians.

Parameters
_gradThe angle expressed in gradians.
Returns
The equivalent angle in radians.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ln()

std::string steppable::__internals::calc::ln ( const std::string & _number,
size_t _decimals )

Calculates the natural logarithm of a number.

Note
The natural logarithm is the logarithm with base e.
Parameters
_numberThe number to calculate the natural logarithm of.
_decimalsThe number of decimal places to round off to.
Returns
The result of the natural logarithm operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ log10()

std::string steppable::__internals::calc::log10 ( const std::string & _number,
size_t _decimals )

Calculates the common logarithm of a number.

Note
The common logarithm is the logarithm with base 10.
Parameters
_numberThe number to calculate the common logarithm of.
_decimalsThe number of decimal places to round off to.
Returns
The result of the common logarithm operation.
Here is the call graph for this function:

◆ log2()

std::string steppable::__internals::calc::log2 ( const std::string & _number,
size_t _decimals )

Calculates the binary logarithm of a number.

Note
The binary logarithm is the logarithm with base 2.
Parameters
_numberThe number to calculate the binary logarithm of.
_decimalsThe number of decimal places to round off to.
Returns
The result of the binary logarithm operation.
Here is the call graph for this function:

◆ logb()

std::string steppable::__internals::calc::logb ( const std::string & _number,
const std::string & _base,
size_t _decimals )

Calculates the logarithm with a given base.

Parameters
_numberThe number to calculate the logarithm of.
_baseThe base of the logarithm.
_decimalsThe number of decimal places to round off to.
Returns
The result of the logarithm operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ loop()

template<typename Pred>
void steppable::__internals::calc::loop ( const std::string & times,
Pred predicate )

Executes a given predicate function a specified number of times.

Parameters
[in]timesThe number of times to execute the predicate function.
[in]predicateThe predicate function to execute.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ multiply()

std::string steppable::__internals::calc::multiply ( const std::string & a,
const std::string & b,
int steps = 2,
int decimals = MAX_DECIMALS )

Multiplies two string representations of numbers.

Parameters
[in]aThe first string representation of the number.
[in]bThe second string representation of the number.
[in]stepsThe number of steps to perform the multiplication.
Returns
The product of the two numbers as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ power()

std::string steppable::__internals::calc::power ( const std::string & _number,
const std::string & raiseTo,
int steps = 2,
int decimals = 8 )

Raises a string representation of a number to a power.

Parameters
[in]_numberThe string representation of the number.
[in]raiseToThe string representation of the power to raise the number to.
[in]stepsThe number of steps to perform the power operation.
[in]decimalsThe number of decimals to output from the power operation.
Returns
The result of the power operation as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radToDeg()

std::string steppable::__internals::calc::radToDeg ( const std::string & _rad,
const int decimals )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radToGrad()

std::string steppable::__internals::calc::radToGrad ( const std::string & _rad,
const int decimals )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ representNumber()

std::string steppable::__internals::calc::representNumber ( const std::string & _number)

Represents a number using alphabets and numberals.

Parameters
[in]_numberThe number in decimal form.
Returns
The number represented using alphabets and numberals.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ root()

std::string steppable::__internals::calc::root ( const std::string & _number,
const std::string & base,
size_t decimals = 8,
int steps = 0 )

Takes the n-th root of a numer.

Parameters
_numberThe number to take root of.
baseThe base of the root.
decimalsThe decimals of the operation.
stepsThe steps to show while taking the root.
Returns
The result of the root operation.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rootIntPart()

std::string steppable::__internals::calc::rootIntPart ( const std::string & _number,
const std::string & base )

Gets the integer part of the root of a number.

Parameters
_numberThe number to get the root of.
baseThe base of the root.
Returns
The integer part of the root of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rootSurd()

Surd steppable::__internals::calc::rootSurd ( const std::string & _number,
const std::string & base )

Converts a root operation into a surd.

Parameters
_numberThe number to convert to a surd.
baseThe base of the root.
Returns
The surd object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sec()

std::string steppable::__internals::calc::sec ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the secant of a number.

Parameters
xThe number to calculate the secant of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the secant in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The secant of the number.
Here is the call graph for this function:

◆ sech()

std::string steppable::__internals::calc::sech ( const std::string & x,
int decimals )

Hyperbolic tangent function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The hyperbolic tangent of the number.
Here is the call graph for this function:

◆ sin()

std::string steppable::__internals::calc::sin ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the sine of a number.

Parameters
xThe number to calculate the sine of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the sine in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The sine of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sinh()

std::string steppable::__internals::calc::sinh ( const std::string & x,
int decimals )

Hyperbolic sine function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The hyperbolic sine of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ subtract()

std::string steppable::__internals::calc::subtract ( const std::string & a,
const std::string & b,
int steps = 2,
bool noMinus = false )

Subtracts one string representation of a number from another string representation of a number.

Parameters
[in]aThe string representation of the minuend.
[in]bThe string representation of the subtrahend.
[in]stepsThe number of steps to perform the subtraction.
[in]noMinusFlag indicating whether to display a minus sign or not.
Returns
The difference between the two numbers as a string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tan()

std::string steppable::__internals::calc::tan ( const std::string & x,
int decimals,
int mode = 0 )

Calculates the tangent of a number.

Parameters
xThe number to calculate the tangent of.
decimalsThe number of decimal places to round off to.
modeThe mode to calculate the tangent in. 0 = radians (default), 1 = degrees, 2 = gradians.
Returns
The tangent of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tanh()

std::string steppable::__internals::calc::tanh ( const std::string & x,
int decimals )

Hyperbolic tangent function.

Parameters
xThe number.
decimalsThe number of decimal places to round off to.
Returns
The hyperbolic tangent of the number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toNumber()

std::string steppable::__internals::calc::toNumber ( const char _input)

Converts a numeral character to a number string.

Parameters
[in]_inputThe character to convert.
Returns
The number string.
Here is the caller graph for this function:
Untitled