public class StandardDouble extends java.lang.Object implements java.io.Serializable, Real
Modifier and Type | Field and Description |
---|---|
static StandardDouble |
SMALLEST
A StandardDouble representing the smallest possible value StandardDouble can represent
|
Constructor and Description |
---|
StandardDouble(double d)
Creates a StandardDouble representing the same number as a double
|
Modifier and Type | Method and Description |
---|---|
StandardDouble |
add(double o)
Adds this Real to a double
|
StandardDouble |
add(Real o)
Adds this Real to another
|
void |
addip(Real o)
Adds a Real to this Real in place.
|
void |
addproductip(Real o1,
double o2)
Adds the product of a Real and a double to this Real in place.
|
StandardDouble |
divide(double o)
Divides this Real by a double
|
StandardDouble |
divide(Real o)
Divides this Real by another one
|
boolean |
equals(java.lang.Object o) |
boolean |
greaterThan(double o)
Compares this real to a double
|
boolean |
greaterThan(Real o)
Compares this real to another
|
int |
hashCode() |
StandardDouble |
inverse()
Returns the inverse of this real (i.e.
|
double |
ln()
Returns the natural logarithm of this Real
|
double |
ln1m()
Returns the natural logithm of one minus the value of this Real
|
StandardDouble |
multiply(double o)
Multiplies this Real by a double
|
StandardDouble |
multiply(Real o)
Multiplies this Real by another
|
void |
multiplyip(double o)
Multiplies this Real by a double in place.
|
void |
multiplyip(Real o)
Multiplies this Real by another Real in place.
|
StandardDouble |
negate()
Negates this real.
|
StandardDouble |
subtract(double o)
Subtracts a double from this Real
|
StandardDouble |
subtract(Real o)
Subtracts another Real from this one
|
double |
toDouble()
Returns this real as a double.
|
SmallDouble |
toSmallDouble()
Returns this real as a SmallDouble
|
java.lang.String |
toString() |
public static final StandardDouble SMALLEST
public StandardDouble(double d)
d
- The double to be representedpublic StandardDouble multiply(Real o)
Real
public StandardDouble multiply(double o)
Real
public StandardDouble add(Real o)
Real
public StandardDouble add(double o)
Real
public double ln()
Real
public double ln1m()
Real
public boolean greaterThan(Real o)
Real
greaterThan
in interface Real
o
- The other realpublic boolean greaterThan(double o)
Real
greaterThan
in interface Real
o
- The doublepublic StandardDouble subtract(Real o)
Real
public StandardDouble subtract(double o)
Real
public StandardDouble negate()
Real
public StandardDouble inverse()
Real
public StandardDouble divide(Real o)
Real
public StandardDouble divide(double o)
Real
public double toDouble()
Real
public SmallDouble toSmallDouble()
Real
toSmallDouble
in interface Real
public void addip(Real o)
Real
public void multiplyip(Real o)
Real
multiplyip
in interface Real
o
- The real to multiply by.public void multiplyip(double o)
Real
multiplyip
in interface Real
o
- The double to multiply by.public void addproductip(Real o1, double o2)
Real
addproductip
in interface Real
o1
- The real to be be used in the product.o2
- The double to be used in the product.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object