Htam v0.2.1 Math.AP View Source
Support for arbitrary precision calculation of some math functions and constants.
Link to this section Summary
Functions
Returns the mathematical constant ℯ rounded to the number of decimal digits passed in. Maximum number of decimal places is 1000. Default is 10 decimal places.
Returns π rounded to the number of decimal digits passed in. Maximum number of decimal places is 1000. Default is 10 decimal places.
Finds the square root of a number to a particular precision.
Returns tau rounded to the number of decimal digits passed in. Maximum number of decimal places is 1000. Default is 10 decimal places.
Link to this section Functions
e(disp \\ 10) View Source
Returns the mathematical constant ℯ rounded to the number of decimal digits passed in. Maximum number of decimal places is 1000. Default is 10 decimal places.
Examples
iex> Math.AP.e
#Decimal<2.7182818285>
iex> Math.AP.e(30)
#Decimal<2.718281828459045235360287471353>
pi(disp \\ 10) View Source
Returns π rounded to the number of decimal digits passed in. Maximum number of decimal places is 1000. Default is 10 decimal places.
Examples
iex> Math.AP.pi
#Decimal<3.1415926536>
iex> Math.AP.pi 30
#Decimal<3.141592653589793238462643383280>
sqrt(num, prec) View Source
Finds the square root of a number to a particular precision.
Examples
iex> Math.AP.sqrt(2, 10)
#Decimal<1.414213562>
iex> Math.AP.sqrt(2, 15)
#Decimal<1.41421356237310>
tau(prec \\ 10) View Source
Returns tau rounded to the number of decimal digits passed in. Maximum number of decimal places is 1000. Default is 10 decimal places.
Examples
iex> Math.AP.tau
#Decimal<6.2831853072>