public class BigReals extends Group implements FieldI, OrderedSetI
BigDecimal
Constructor and Description |
---|
BigReals(int scale)
Create a BigReals group with round mode set to
BigDecimal.ROUND_HALF_DOWN.
|
BigReals(int scale,
int roundMode)
Create a field of BigIntegers.
|
Modifier and Type | Method and Description |
---|---|
Number |
add(Number num1,
Number num2)
Get sum of the numbers
|
int |
compare(Number a,
Number b)
Returns -1,0,1 depending on whether a is less than, equal to or greater than b.
|
Number |
div(Number num1,
Number num2)
get division of two numbers.
|
boolean |
equals(Number a,
Number b)
whether two numbers are equal
|
Number |
getInverse(Number num)
Get Inverse of a number
|
Number |
getMulInverse(Number num)
get mul inverse
|
Number |
getONE()
Get multiplicative identity i.e.
|
Number |
getZERO()
Returns the identity element under +
|
Number |
mul(Number num1,
Number num2)
Returns the product of two numbers, a*b
|
Number |
sub(Number num1,
Number num2)
Get the difference of the numbers.
|
Number |
valueOf(String str)
returns number given by the string
|
addStandardConstants, addStandardFunctions, getNumberFactory, isConstantPoly, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addStandardConstants, addStandardFunctions, getNumberFactory, isConstantPoly
public BigReals(int scale, int roundMode)
BigDecimal.divide(BigDecimal,int,int)
.
if scale is negative then the
BigDecimal.divide(BigDecimal,int)
. is called instead.public BigReals(int scale)
scale
- public Number getZERO()
GroupI
public Number getONE()
RingI
public Number getInverse(Number num)
GroupI
getInverse
in interface GroupI
public Number getMulInverse(Number num)
FieldI
getMulInverse
in interface FieldI
public Number add(Number num1, Number num2)
GroupI
public Number sub(Number num1, Number num2)
GroupI
public Number mul(Number num1, Number num2)
RingI
public Number div(Number num1, Number num2)
HasDivI
public boolean equals(Number a, Number b)
GroupI
public int compare(Number a, Number b)
OrderedSetI
compare
in interface OrderedSetI
Jas4pp 1.5 © Java Analysis Studio for Particle Physics