java.lang.Object
java.lang.Number
at.syntaxerror.ieee754.Floating<T>
at.syntaxerror.ieee754.decimal.Decimal<T>
- All Implemented Interfaces:
Serializable
,Comparable<T>
- Direct Known Subclasses:
Decimal128
,Decimal32
,Decimal64
This class is the base class for implementing IEEE 754 decimal floating point specifications
- Author:
- Thomas Kasper
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic @NonNull DecimalCoding
The coding method used byencode()
andDecimalCodec.encode(Decimal)
-
Constructor Summary
ConstructorsConstructorDescriptionDecimal
(int signum, FloatingType type) Decimal
(int signum, BigDecimal value) -
Method Summary
Modifier and TypeMethodDescriptionencode()
Encodes this number into its binary representation using the representation method specified byDEFAULT_CODING
.Encodes this number into its binary representation using the binary integer decimal representation methodEncodes this number into its binary representation using the densly packed decimal representation methodMethods inherited from class at.syntaxerror.ieee754.Floating
compareTo, doubleValue, floatValue, getBigDecimal, getCodec, getSignum, intValue, isFinite, isInfinity, isNaN, isNegative, isNegativeInfinity, isNegativeZero, isPositive, isPositiveInfinity, isPositiveZero, isQuietNaN, isSignalingNaN, isZero, longValue, toString
Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
DEFAULT_CODING
The coding method used byencode()
andDecimalCodec.encode(Decimal)
-
-
Constructor Details
-
Decimal
-
Decimal
-
-
Method Details
-
encode
Encodes this number into its binary representation using the representation method specified byDEFAULT_CODING
. -
encodeDPD
Encodes this number into its binary representation using the densly packed decimal representation method- Returns:
- the binary representation
-
encodeBID
Encodes this number into its binary representation using the binary integer decimal representation method- Returns:
- the binary representation
-