Package com.upokecenter.numbers
Class EDecimal
- java.lang.Object
-
- com.upokecenter.numbers.EDecimal
-
-
Field Summary
Fields Modifier and Type Field Description static EDecimalNaNstatic EDecimalNegativeInfinitystatic EDecimalNegativeZerostatic EDecimalOnestatic EDecimalPositiveInfinitystatic EDecimalSignalingNaNstatic EDecimalTenstatic EDecimalZero
-
Method Summary
-
-
-
Field Detail
-
NaN
public static final EDecimal NaN
-
NegativeInfinity
public static final EDecimal NegativeInfinity
-
NegativeZero
public static final EDecimal NegativeZero
-
One
public static final EDecimal One
-
PositiveInfinity
public static final EDecimal PositiveInfinity
-
SignalingNaN
public static final EDecimal SignalingNaN
-
Ten
public static final EDecimal Ten
-
Zero
public static final EDecimal Zero
-
-
Method Detail
-
Copy
public EDecimal Copy()
-
getExponent
public final EInteger getExponent()
-
isFinite
public final boolean isFinite()
-
isNegative
public final boolean isNegative()
-
isZero
public final boolean isZero()
-
IsInteger
public boolean IsInteger()
-
getMantissa
public final EInteger getMantissa()
-
signum
public final int signum()
-
getUnsignedMantissa
public final EInteger getUnsignedMantissa()
-
Create
public static EDecimal Create(int mantissaSmall, int exponentSmall)
-
Create
public static EDecimal Create(long mantissaLong, int exponentSmall)
-
Create
public static EDecimal Create(long mantissaLong, long exponentLong)
-
CreateNaN
public static EDecimal CreateNaN(EInteger diag, boolean signaling, boolean negative, EContext ctx)
-
FromDouble
public static EDecimal FromDouble(double dbl)
-
FromExtendedFloat
@Deprecated public static EDecimal FromExtendedFloat(EFloat ef)
Deprecated.Renamed to FromEFloat.
-
FromBoolean
public static EDecimal FromBoolean(boolean boolValue)
-
FromInt32
public static EDecimal FromInt32(int valueSmaller)
-
FromInt64
public static EDecimal FromInt64(long valueSmall)
-
FromSingle
public static EDecimal FromSingle(float flt)
-
FromString
public static EDecimal FromString(java.lang.String str)
-
FromString
public static EDecimal FromString(java.lang.String str, int offset, int length)
-
FromString
public static EDecimal FromString(java.lang.String str, int offset, int length, EContext ctx)
-
Abs
public EDecimal Abs()
-
compareTo
public int compareTo(EDecimal other)
- Specified by:
compareToin interfacejava.lang.Comparable<EDecimal>
-
compareTo
public int compareTo(int intOther)
-
CompareToValue
public int CompareToValue(int intOther)
-
CompareToValue
public int CompareToValue(EDecimal other)
-
CompareToBinary
public int CompareToBinary(EFloat other)
-
CompareToTotalMagnitude
public int CompareToTotalMagnitude(EDecimal other)
-
CompareToTotal
public int CompareToTotal(EDecimal other)
-
DivideAndRemainderNaturalScale
@Deprecated public EDecimal[] DivideAndRemainderNaturalScale(EDecimal divisor)
Deprecated.Renamed to DivRemNaturalScale.
-
DivideAndRemainderNaturalScale
@Deprecated public EDecimal[] DivideAndRemainderNaturalScale(EDecimal divisor, EContext ctx)
Deprecated.Renamed to DivRemNaturalScale.
-
DivideToExponent
public EDecimal DivideToExponent(EDecimal divisor, long desiredExponentSmall, EContext ctx)
-
DivideToExponent
public EDecimal DivideToExponent(EDecimal divisor, int desiredExponentInt, EContext ctx)
-
DivideToExponent
public EDecimal DivideToExponent(EDecimal divisor, long desiredExponentSmall, ERounding rounding)
-
DivideToExponent
public EDecimal DivideToExponent(EDecimal divisor, int desiredExponentInt, ERounding rounding)
-
DivideToExponent
public EDecimal DivideToExponent(EDecimal divisor, EInteger exponent, EContext ctx)
-
DivideToExponent
public EDecimal DivideToExponent(EDecimal divisor, EInteger desiredExponent, ERounding rounding)
-
DivideToIntegerNaturalScale
public EDecimal DivideToIntegerNaturalScale(EDecimal divisor, EContext ctx)
-
equals
public boolean equals(EDecimal other)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
IsInfinity
public boolean IsInfinity()
-
IsNaN
public boolean IsNaN()
-
IsNegativeInfinity
public boolean IsNegativeInfinity()
-
IsPositiveInfinity
public boolean IsPositiveInfinity()
-
IsQuietNaN
public boolean IsQuietNaN()
-
IsSignalingNaN
public boolean IsSignalingNaN()
-
MovePointLeft
public EDecimal MovePointLeft(int places)
-
MovePointRight
public EDecimal MovePointRight(int places)
-
Add
public EDecimal Add(int intValue)
-
Subtract
public EDecimal Subtract(int intValue)
-
Multiply
public EDecimal Multiply(int intValue)
-
Divide
public EDecimal Divide(int intValue)
-
MultiplyAndSubtract
public EDecimal MultiplyAndSubtract(EDecimal op, EDecimal subtrahend, EContext ctx)
-
Negate
public EDecimal Negate()
-
Pow
public EDecimal Pow(int exponentSmall)
-
Precision
public EInteger Precision()
-
RemainderNoRoundAfterDivide
public EDecimal RemainderNoRoundAfterDivide(EDecimal divisor, EContext ctx)
-
RoundToExponent
public EDecimal RoundToExponent(int exponentSmall)
-
RoundToIntegralExact
@Deprecated public EDecimal RoundToIntegralExact(EContext ctx)
Deprecated.Renamed to RoundToIntegerExact.
-
RoundToIntegralNoRoundedFlag
@Deprecated public EDecimal RoundToIntegralNoRoundedFlag(EContext ctx)
Deprecated.Renamed to RoundToIntegerNoRoundedFlag.
-
ScaleByPowerOfTen
public EDecimal ScaleByPowerOfTen(int places)
-
ToDouble
public double ToDouble()
-
ToEInteger
public EInteger ToEInteger()
-
ToEIntegerExact
@Deprecated public EInteger ToEIntegerExact()
Deprecated.Renamed to ToEIntegerIfExact.
-
ToEIntegerIfExact
public EInteger ToEIntegerIfExact()
-
ToEngineeringString
public java.lang.String ToEngineeringString()
-
ToExtendedFloat
@Deprecated public EFloat ToExtendedFloat()
Deprecated.Renamed to ToEFloat.
-
ToEFloat
public EFloat ToEFloat()
-
ToPlainString
public java.lang.String ToPlainString()
-
ToSingle
public float ToSingle()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
Ulp
public EDecimal Ulp()
-
ToSizedEInteger
public EInteger ToSizedEInteger(int maxBitLength)
-
ToSizedEIntegerIfExact
public EInteger ToSizedEIntegerIfExact(int maxBitLength)
-
Increment
public EDecimal Increment()
-
Decrement
public EDecimal Decrement()
-
ToByteChecked
public byte ToByteChecked()
-
ToByteUnchecked
public byte ToByteUnchecked()
-
ToByteIfExact
public byte ToByteIfExact()
-
FromByte
public static EDecimal FromByte(byte inputByte)
-
ToInt16Checked
public short ToInt16Checked()
-
ToInt16Unchecked
public short ToInt16Unchecked()
-
ToInt16IfExact
public short ToInt16IfExact()
-
FromInt16
public static EDecimal FromInt16(short inputInt16)
-
ToInt32Checked
public int ToInt32Checked()
-
ToInt32Unchecked
public int ToInt32Unchecked()
-
ToInt32IfExact
public int ToInt32IfExact()
-
ToInt64Checked
public long ToInt64Checked()
-
ToInt64Unchecked
public long ToInt64Unchecked()
-
ToInt64IfExact
public long ToInt64IfExact()
-
-