|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.util.FloatingPointArithmetic
public class FloatingPointArithmetic
Manipulate floating-point (float) numbers.
Creation date: 4 sept. 2006
Constructor Summary | |
---|---|
FloatingPointArithmetic()
|
Method Summary | |
---|---|
static java.lang.String |
getBitString(float value)
Returns a string representing the bits of a float, in a readable format. |
static int |
getExponent(float value)
Return the exponent of a float. |
static float |
getMantisse(float value)
returns the mantisse of a float |
static float |
round(float bigNumber,
float smallNumber)
Round a small number so that it have the same precision of a big number. If we know x <= bignumber and b1 + b2 + ... |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FloatingPointArithmetic()
Method Detail |
---|
public static int getExponent(float value)
value
-
public static float getMantisse(float value)
value
-
public static java.lang.String getBitString(float value)
value
-
public static float round(float bigNumber, float smallNumber)
x <= bignumber
and b1 + b2 + ... + bn = x
then
if all bi
are rounded relative to the big number, we have x - b1 - b2 - ... - bn = 0
.
bigNumber
- smallNumber
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |