Releases: zdodson21/mathfun-lib
Percent Function
Percent function added
Ex: percent(72, 5) = 5% * 72 = 3.6
Pre-stable Version
Note: This library is not yet in a stable state. Exponent function cannot calculate with decimals powers (which results in root function not working yet either)
The following functions are available:
-
add(a, b)- Calculates the sum of valuesa&b -
subtract(a, b)- Calculates the difference ofbsubtracted froma -
multiply(a, b)- Calculates the product of valuesa&b -
divide(a, b)- Calculates the quotient ofadivided byb -
one_over(a)- Calculates the quotient of 1 divided bya -
is_whole_num(a)- Returns whether or notais a whole number -
is_even(a)- Returns whether or notais an even number -
am(a, b)- Calculates the Arithmetic Mean of provided valuesa&b -
gm(a, b)- Calculates the Geometric Mean of provided valuesa&b -
agm(a, b)- Calculates the Arithmetic-Geometric Mean ofaandb -
sq_root(a)- Calculates the square root ofa -
ln(a)- Calculates the natural log ofausing the formula informulas/natural-log.odf. This file can be opened w/ LibreOffice Math- Note: The results returned from this function will start to lose precision around the hundred thousandths decimal place.
-
log(base, arguement)- Calculates the logarithm ofbase&arguement -
exponent(base, exponent)- Calculates the value ofbaseto theexponentpower- Note: This only works when the exponent is a whole number (currently)
-
root(index, radicand)- Calculates the value ofindexto the root ofradicand