public class MathFunctionCalculator extends Object
| Constructor and Description |
|---|
MathFunctionCalculator() |
| Modifier and Type | Method and Description |
|---|---|
protected static Ptg |
calcAbs(Ptg[] operands)
ABS
Returns the absolute value of a number
|
protected static Ptg |
calcAcos(Ptg[] operands)
ACOS
Returns the arccosine of a number
|
protected static Ptg |
calcAcosh(Ptg[] operands)
ACOSH
Returns the inverse hyperbolic cosine of a number
|
protected static Ptg |
calcAsin(Ptg[] operands)
ASIN
Returns the arcsine of a number
|
protected static Ptg |
calcAsinh(Ptg[] operands)
ASINH
Returns the inverse hyperbolic sine of a number
|
protected static Ptg |
calcAtan(Ptg[] operands)
ATAN
Returns the arctangent of a number
|
protected static Ptg |
calcAtan2(Ptg[] operands)
ATAN2
Returns the arctangent from x- and y- coordinates
|
protected static Ptg |
calcAtanh(Ptg[] operands)
ATANH
Returns the inverse hyperbolic tangent of a number
|
protected static Ptg |
calcCeiling(Ptg[] operands)
CEILING
Rounds a number to the nearest multiple of significance;
This takes 2 values, first the number to round, next the value of signifigance.
|
protected static Ptg |
calcCombin(Ptg[] operands)
COMBIN
Returns the number of combinations for a given number of objects
|
protected static Ptg |
calcCos(Ptg[] operands)
COS
Returns the cosine of a number
|
protected static Ptg |
calcCosh(Ptg[] operands)
COSH
Returns the hyperbolic cosine of a number
|
protected static Ptg |
calcDegrees(Ptg[] operands)
DEGREES
Converts radians to degrees
|
protected static Ptg |
calcEven(Ptg[] operands)
EVEN
Rounds a number up to the nearest even integer
|
protected static Ptg |
calcExp(Ptg[] operands)
EXP
Returns e raised to the power of number.
|
protected static Ptg |
calcFact(Ptg[] operands)
FACT
Returns the factorial of a number
|
protected static Ptg |
calcFactDouble(Ptg[] operands)
FACTDOUBLE
Returns the double factorial of a number
Example
!!6 = 6*4*2
!!7 = 7*5*3*1;
|
protected static Ptg |
calcFloor(Ptg[] operands)
FLOOR
Rounds a number down, toward zero.
|
protected static Ptg |
calcGCD(Ptg[] operands)
GCD
Returns the greatest common divisor
TODO: Finish!
|
protected static Ptg |
calcInt(Ptg[] operands)
INT
Rounds a number down to the nearest integer
|
protected static Ptg |
calcLCM(Ptg[] operands)
LCM
Returns the least common multiple
|
protected static Ptg |
calcLn(Ptg[] operands)
LN
Returns the natural logarithm of a number
|
protected static Ptg |
calcLog(Ptg[] operands)
LOG
Returns the logarithm of a number to a specified base
|
protected static Ptg |
calcLog10(Ptg[] operands)
LOG10
Returns the base-10 logarithm of a number
|
protected static Ptg |
calcMMult(Ptg[] operands)
MMULT
Returns the matrix product of two arrays:
The number of columns in array1 must be the same as the number of rows in array2,
and both arrays must contain only numbers.
|
protected static Ptg |
calcMod(Ptg[] operands)
MOD
Returns the remainder from division
|
protected static Ptg |
calcMRound(Ptg[] operands)
MROUND
Returns a number rounded to the desired multiple
|
protected static Ptg |
calcMultinomial(Ptg[] operands)
MULTINOMIAL
Returns the multinomial of a set of numbers
|
protected static Ptg |
calcOdd(Ptg[] operands)
ODD
Rounds a number up to the nearest odd integer
|
protected static Ptg |
calcPi(Ptg[] operands)
PI
Returns the value of Pi
|
protected static Ptg |
calcPower(Ptg[] operands)
POWER
Returns the result of a number raised to a power
|
protected static Ptg |
calcProduct(Ptg[] operands)
PRODUCT
Multiplies its arguments
NOTE: we gotta deal with ranges/refs/numbers here
|
protected static Ptg |
calcQuotient(Ptg[] operands)
QUOTIENT
Returns the integer portion of a division
|
protected static Ptg |
calcRadians(Ptg[] operands)
RADIANS
Converts degrees to radians
|
protected static Ptg |
calcRand(Ptg[] operands)
RAND
Returns a random number between 0 and 1
|
protected static Ptg |
calcRandBetween(Ptg[] operands)
RANDBETWEEN
Returns a random number between the numbers you specify
|
protected static Ptg |
calcRoman(Ptg[] operands)
ROMAN
Converts an Arabic numeral to Roman, as text
This one is a trip!
|
protected static Ptg |
calcRound(Ptg[] operands)
ROUND
Rounds a number to a specified number of digits
This one is kind of nasty.
|
protected static Ptg |
calcRoundDown(Ptg[] operands)
ROUNDDOWN
Rounds a number down, toward zero.
|
protected static Ptg |
calcRoundUp(Ptg[] operands)
ROUNDUP
Rounds a number up, away from zero
|
protected static Ptg |
calcSign(Ptg[] operands)
SIGN
Returns the sign of a number
return 1 if positive, -1 if negative, or 0 if 0;
|
protected static Ptg |
calcSin(Ptg[] operands)
SIN
Returns the sine of the given angle
|
protected static Ptg |
calcSinh(Ptg[] operands)
SINH
Returns the hyperbolic sine of a number
|
protected static Ptg |
calcSqrt(Ptg[] operands)
SQRT
Returns a positive square root
|
protected static Ptg |
calcSqrtPi(Ptg[] operands)
SQRTPI
Returns the square root of (number * PI)
|
protected static Ptg |
calcSum(Ptg[] operands)
SUM
Adds all the numbers in a range of cells.
|
protected static Ptg |
calcSumif(Ptg[] operands)
SUMIF
Adds the cells specified by a given criteria
You use the SUMIF function to sum the values in a range that meet criteria that you specify.
|
protected static Ptg |
calcSumIfS(Ptg[] operands)
SUMIFS
Adds the cells in a range (range: Two or more cells on a sheet.
|
protected static Ptg |
calcSumproduct(Ptg[] operands)
SUMPRODUCT
Returns the sum of the products of corresponding array components
|
protected static Ptg |
calcTan(Ptg[] operands)
TAN
Returns the tangent of a number
|
protected static Ptg |
calcTanh(Ptg[] operands)
TANH
Returns the hyperbolic tangent of a number
|
protected static Ptg |
calcTrunc(Ptg[] operands)
TRUNC
Truncates a number to an integer
|
static long |
factorial(long n) |
protected static Ptg calcSum(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcAcosh(Ptg[] operands)
protected static Ptg calcAsinh(Ptg[] operands)
protected static Ptg calcAtan2(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcAtanh(Ptg[] operands)
protected static Ptg calcCeiling(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcCombin(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcCosh(Ptg[] operands)
protected static Ptg calcEven(Ptg[] operands)
protected static Ptg calcExp(Ptg[] operands)
protected static Ptg calcFactDouble(Ptg[] operands)
protected static Ptg calcFloor(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcGCD(Ptg[] operands)
protected static Ptg calcInt(Ptg[] operands)
protected static Ptg calcLog(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcLog10(Ptg[] operands)
protected static Ptg calcMMult(Ptg[] operands)
protected static Ptg calcMod(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcMRound(Ptg[] operands)
protected static Ptg calcMultinomial(Ptg[] operands)
protected static Ptg calcOdd(Ptg[] operands)
protected static Ptg calcPower(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcProduct(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcQuotient(Ptg[] operands)
protected static Ptg calcRandBetween(Ptg[] operands)
protected static Ptg calcRoman(Ptg[] operands)
protected static Ptg calcRound(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcRoundDown(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcRoundUp(Ptg[] operands) throws CalculationException
CalculationExceptionprotected static Ptg calcSign(Ptg[] operands)
protected static Ptg calcSqrtPi(Ptg[] operands)
protected static Ptg calcSumif(Ptg[] operands)
protected static Ptg calcSumIfS(Ptg[] operands)
operands - protected static Ptg calcSumproduct(Ptg[] operands)
protected static Ptg calcTanh(Ptg[] operands)
public static long factorial(long n)
Copyright © 2002–2019 Starter Inc.. All rights reserved.