Package eu.simuline.util
Class RealRepresentation.DoubleRep
- java.lang.Object
-
- eu.simuline.util.RealRepresentation
-
- eu.simuline.util.RealRepresentation.DoubleRep
-
- Enclosing class:
- RealRepresentation
private static final class RealRepresentation.DoubleRep extends RealRepresentation
Describes the representation of a double, resp. a Double-value. It is characterized by theRealRepresentation.mantissa()and theRealRepresentation.exponent. The mantissa in turn splits into theRealRepresentation.integerand theRealRepresentation.fractional part.- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.simuline.util.RealRepresentation
RealRepresentation.Cutter, RealRepresentation.Desc
-
-
Field Summary
-
Fields inherited from class eu.simuline.util.RealRepresentation
ALIGN_CUT_OFF_LEFT, ALIGN_CUT_OFF_RIGHT, ALIGN_EXCEPTION, ALIGN_LEAVE_UNCHANGED, EXP_CHAR, exponent, fraction, integer, sign
-
-
Constructor Summary
Constructors Constructor Description DoubleRep(double dbl)Constructs a newly allocatedDoubleRepobject that represents the primitivedoubleargument.DoubleRep(java.lang.Double dbl)Creates a newDoubleRep.DoubleRep(java.lang.String dStr)Constructs a newly allocatedDoubleRepobject that represents the floating-point value of type double represented by the string.
-
Method Summary
-
Methods inherited from class eu.simuline.util.RealRepresentation
alignLeft, alignRight, asInteger, compensatePoint, create, create, create, create, exponent, fill, fraction, hasBlankFraction, hasExponent, hasFraction, hasInteger, initSignExp, integer, mantissa, sign, this2BigDecimal, this2double, this2Double, toString, toString, toStringDecomp, trimExponent, trimFraction, trimInteger
-
-
-
-
Constructor Detail
-
DoubleRep
DoubleRep(double dbl)
Constructs a newly allocatedDoubleRepobject that represents the primitivedoubleargument.- Parameters:
dbl- the value to be represented by thisDoubleRep.- Throws:
java.lang.NumberFormatException- ifdis either infinite or not a number.- See Also:
Double(double)
-
DoubleRep
DoubleRep(java.lang.String dStr)
Constructs a newly allocatedDoubleRepobject that represents the floating-point value of type double represented by the string. The string is converted to a double value as if by the methodDouble.valueOf(java.lang.String).- Parameters:
dStr- a string to be converted to aDoubleRep.- Throws:
java.lang.IllegalArgumentException- ifdis either infinite or not a number.java.lang.NumberFormatException- ifdhas not the appropriate number format.- See Also:
Double(String)
-
DoubleRep
DoubleRep(java.lang.Double dbl)
Creates a newDoubleRep. An analog toDoubleRep(double).- Parameters:
dbl- aDoubleobject.- Throws:
java.lang.IllegalArgumentException- ifdis either infinite or not a number.
-
-