www.java-big.info
Pure mathematics w/o unnecessary transformations |
|
The functions overview: |
NUMBERS |
Type of |
||||||
Natural+0 |
Integer |
Rational |
Real |
all |
Parameters |
Result |
||
Basic methods |
Changing a numerical system |
changeBase |
s1, s2, x |
z |
||||
Random value |
rnd |
s, xmax |
z |
|||||
Ludolf's number |
pi |
s |
z |
|||||
Euler's number |
e |
s |
z |
|||||
Apéry's number |
zeta |
s |
z |
|||||
Golden ratio |
phi |
s |
z |
|||||
Square root of two |
sqrt2 |
s |
z |
|||||
Parity (EVEN/ODD) |
parity |
s, x |
z |
|||||
Compare two values |
compareNat |
compareInt |
compareRat |
compareDec |
compare |
s, x, y |
c |
|
Sum of two values |
plusNat |
plusInt |
plusRat |
plusDec |
plus |
s, x, y |
z |
|
Subtracting |
minusNat |
minusInt |
minusRat |
minusDec |
minus |
s, x, y |
z |
|
Multiplying one value by another |
multiNat |
multiInt |
multiRat |
multiDec |
multi |
s, x, y |
z |
|
Dividing one value to another |
divNat |
divInt |
divRat |
divDec |
div |
s, x, y |
z |
|
Rest after division |
moduloInt |
moduloRat |
moduloDec |
modulo |
s, x, y |
z |
||
Power |
powerRat |
powerDec |
power |
s, x, y |
z |
|||
Square root |
sqrt |
s, x, a |
z |
|||||
Root |
root |
s, x, y, a |
z |
|||||
Natural logarithm |
ln |
s, x, a |
z |
|||||
Natural exponential function ex |
exp |
s, x, a |
z |
|||||
Sine |
sin |
s, x, a |
z |
|||||
Cosine |
cos |
s, x, a |
z |
|||||
Factorial |
factorial |
» |
» |
» |
s, x |
z |
||
Largest common divisor |
gcd |
» |
» |
» |
s, x, y |
z |
||
Least common multiple |
lcm |
» |
» |
» |
s, x, y |
z |
||
Absolute value |
abs |
» |
» |
» |
x |
z |
||
Change +/- sign |
neg |
» |
» |
» |
x |
z |
||
Returns a sign |
signum |
» |
» |
» |
x |
c |
||
Test to zero |
isZero |
» |
» |
» |
» |
x |
b |
|
Auxiliary methods |
Sum of ciphers |
cipherSum |
» |
» |
» |
» |
s, x |
z |
Returns the alphabet |
getAbc |
» |
» |
» |
» |
- |
z |
|
Sets the alphabet |
setAbc |
» |
» |
» |
» |
x |
- |
|
Returns a length of the alphabet |
abcLength |
» |
» |
» |
» |
- |
i |
|
Converts char to int |
c2i |
» |
» |
» |
» |
c |
i |
|
Converts int to a char |
i2c |
» |
» |
» |
» |
i |
c |
|
Natural number test |
isNat |
» |
» |
» |
» |
s, x |
b |
|
Test a number with the rest |
isRat |
» |
» |
» |
» |
s, x |
b |
|
Returns a numerator |
numPart |
» |
» |
» |
» |
x |
z |
|
Returns a denominator |
denPart |
» |
» |
» |
» |
x |
z |
|
Returns a whole part |
intPart |
» |
» |
» |
x |
z |
||
Returns a decimal part |
decPart |
» |
» |
» |
x |
z |
||
Returns a part with remainder |
fractPart |
» |
» |
» |
x |
z |
||
Integer test |
isInt |
» |
» |
» |
s, x |
b |
||
Converts Dec to Rat |
dec2rat |
» |
» |
s, x |
z |
|||
Converts Dec to Rat |
rat2dec |
» |
s, x, a |
z |
||||
Rounds off a decimal number |
round |
» |
s, x, a |
z |
||||
Decimal number test |
isDec |
» |
s, x |
b |
||||
Modular inverse |
modInv |
s, x, y |
z |
|||||
Modular exponentiation |
modPow |
s, x1, x2, x3 |
z |
|||||
Primality test |
OBSOLETE, see WWW.PRIMULA.CLICK | isPrime | s, x | b | ||||
Fix of redundant characters |
check |
s, x |
z |
|||||
|
»
= availability of the method through inheritance boolean b = test result |
HW: DELL |
HW: ASUS |
|
![]() |
![]() |
|
Graph 1 |
Graph 2 |