类 DfpDec
java.lang.Object
org.hipparchus.dfp.Dfp
org.hipparchus.dfp.DfpDec
- 所有已实现的接口:
-
CalculusFieldElement<Dfp>
,FieldElement<Dfp>
- 直接已知子类:
-
Decimal10
Subclass of
Dfp
which hides the radix-10000 artifacts of the superclass. This should give outward appearances of being a decimal number with DIGITS*4-3 decimal digits. This class can be subclassed to appear to be an arbitrary number of decimal digits less than DIGITS*4-3.
-
字段概要
-
构造器概要
限定符构造器说明Copy constructor.protected
Makes an instance with a value of zero.protected
Create an instance from a byte value.protected
Creates an instance with a non-finite value.protected
Create an instance from a double value.protected
Create an instance from an int value.protected
Create an instance from a long value.protected
Create an instance from a String representation. -
方法概要
修饰符和类型方法说明protected int
Get the number of decimal digits this class is going to represent.Create an instance with a value of 0.newInstance
(byte x) Create an instance from a byte value.newInstance
(byte sign, byte nans) Creates an instance with a non-finite value.newInstance
(double x) Create an instance corresponding to a constant real value.newInstance
(int x) Create an instance from an int value.newInstance
(long x) Create an instance from a long value.Create an instance from a String representation.newInstance
(Dfp d) Create an instance by copying an existing one.Returns the next number greater than this one in the direction of x.protected int
round
(int in) Round this given the next digit n using the current rounding mode.从类继承的方法 org.hipparchus.dfp.Dfp
abs, acos, acosh, add, add, align, asin, asinh, atan, atan2, atanh, cbrt, ceil, classify, complement, copysign, copySign, copySign, cos, cosh, dfp2sci, dfp2string, divide, divide, divide, dotrap, equals, exp, expm1, floor, getExponent, getField, getOne, getPi, getRadixDigits, getReal, getTwo, getZero, greaterThan, hashCode, hypot, intLog10, intValue, isInfinite, isNaN, isZero, lessThan, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, linearCombination, log, log10, log10K, log1p, multiply, multiply, multiply, negate, negativeOrNull, newInstance, positiveOrNull, pow, pow, pow, power10, power10K, reciprocal, remainder, remainder, rint, rootN, scalb, shiftLeft, shiftRight, sign, sin, sinCos, sinh, sinhCosh, sqrt, strictlyNegative, strictlyPositive, subtract, subtract, tan, tanh, toDegrees, toDouble, toRadians, toSplitDouble, toString, trap, trunc, ulp, unequal
从接口继承的方法 org.hipparchus.CalculusFieldElement
isFinite, norm, round
-
构造器详细资料
-
DfpDec
Makes an instance with a value of zero.- 参数:
-
factory
- factory linked to this instance
-
DfpDec
Create an instance from a byte value.- 参数:
-
factory
- factory linked to this instance -
x
- value to convert to an instance
-
DfpDec
Create an instance from an int value.- 参数:
-
factory
- factory linked to this instance -
x
- value to convert to an instance
-
DfpDec
Create an instance from a long value.- 参数:
-
factory
- factory linked to this instance -
x
- value to convert to an instance
-
DfpDec
Create an instance from a double value.- 参数:
-
factory
- factory linked to this instance -
x
- value to convert to an instance
-
DfpDec
Copy constructor.- 参数:
-
d
- instance to copy
-
DfpDec
Create an instance from a String representation.- 参数:
-
factory
- factory linked to this instance -
s
- string representation of the instance
-
DfpDec
Creates an instance with a non-finite value.- 参数:
-
factory
- factory linked to this instance -
sign
- sign of the Dfp to create -
nans
- code of the value, must be one ofDfp.INFINITE
,Dfp.SNAN
,Dfp.QNAN
-
-
方法详细资料
-
newInstance
Create an instance with a value of 0. Use this internally in preference to constructors to facilitate subclasses- 覆盖:
-
newInstance
在类中Dfp
- 返回:
- a new instance with a value of 0
-
newInstance
Create an instance from a byte value.- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
x
- value to convert to an instance - 返回:
- a new instance with value x
-
newInstance
Create an instance from an int value.- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
x
- value to convert to an instance - 返回:
- a new instance with value x
-
newInstance
Create an instance from a long value.- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
x
- value to convert to an instance - 返回:
- a new instance with value x
-
newInstance
Create an instance corresponding to a constant real value.- 指定者:
-
newInstance
在接口中CalculusFieldElement<Dfp>
- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
x
- constant real value - 返回:
- instance corresponding to a constant real value
-
newInstance
Create an instance by copying an existing one. Use this internally in preference to constructors to facilitate subclasses.- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
d
- instance to copy - 返回:
- a new instance with the same value as d
-
newInstance
Create an instance from a String representation. Use this internally in preference to constructors to facilitate subclasses.- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
s
- string representation of the instance - 返回:
- a new instance parsed from specified string
-
newInstance
Creates an instance with a non-finite value.- 覆盖:
-
newInstance
在类中Dfp
- 参数:
-
sign
- sign of the Dfp to create -
nans
- code of the value, must be one ofDfp.INFINITE
,Dfp.SNAN
,Dfp.QNAN
- 返回:
- a new instance with a non-finite value
-
getDecimalDigits
protected int getDecimalDigits()Get the number of decimal digits this class is going to represent. Default implementation returnsDfp.getRadixDigits()
*4-3. Subclasses can override this to return something less.- 返回:
- number of decimal digits this class is going to represent
-
round
protected int round(int in) Round this given the next digit n using the current rounding mode. -
nextAfter
Returns the next number greater than this one in the direction of x. If this==x then simply returns this.
-