Top Description Inners Fields Constructors Methods
org.apache.commons.math3.dfp

public Class DfpField

extends Object
implements Field<Dfp>
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.Field
Imports
org.apache.commons.math3.Field, .FieldElement

Field for Decimal floating point instances.
Since
2.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DfpField.RoundingMode

Enumerate for rounding modes.

Field Summary

Modifier and TypeField and Description
private final Dfp
e

A Dfp with value e.

private final Dfp[]
eSplit

A two elements Dfp array with value e split in two pieces.

private static String
eString

High precision string representation of e.

public static final int
FLAG_DIV_ZERO

IEEE 854-1987 flag for division by zero.

public static final int
FLAG_INEXACT

IEEE 854-1987 flag for inexact result.

public static final int
FLAG_INVALID

IEEE 854-1987 flag for invalid operation.

public static final int
FLAG_OVERFLOW

IEEE 854-1987 flag for overflow.

public static final int
FLAG_UNDERFLOW

IEEE 854-1987 flag for underflow.

private int
ieeeFlags

IEEE 854-1987 signals.

private final Dfp
ln10

A Dfp with value ln(10).

private static String
ln10String

High precision string representation of ln(10).

private final Dfp
ln2

A Dfp with value ln(2).

private final Dfp[]
ln2Split

A two elements Dfp array with value ln(2) split in two pieces.

private static String
ln2String

High precision string representation of ln(2).

private final Dfp
ln5

A Dfp with value ln(5).

private final Dfp[]
ln5Split

A two elements Dfp array with value ln(5) split in two pieces.

private static String
ln5String

High precision string representation of ln(5).

private final Dfp
one

A Dfp with value 1.

private final Dfp
pi

A Dfp with value π.

private final Dfp[]
piSplit

A two elements Dfp array with value π split in two pieces.

private static String
piString

High precision string representation of π.

private final int
radixDigits

The number of radix digits.

private DfpField.RoundingMode
rMode

Current rounding mode.

private final Dfp
sqr2

A Dfp with value √2.

private final Dfp
sqr2Reciprocal

A Dfp with value √2 / 2.

private static String
sqr2ReciprocalString

High precision string representation of √2 / 2.

private final Dfp[]
sqr2Split

A two elements Dfp array with value √2 split in two pieces.

private static String
sqr2String

High precision string representation of √2.

private final Dfp
sqr3

A Dfp with value √3.

private final Dfp
sqr3Reciprocal

A Dfp with value √3 / 3.

private static String
sqr3ReciprocalString

High precision string representation of √3 / 3.

private static String
sqr3String

High precision string representation of √3.

private final Dfp
two

A Dfp with value 2.

private final Dfp
zero

A Dfp with value 0.

Constructor Summary

AccessConstructor and Description
public
DfpField(final int
minimal number of decimal digits.
decimalDigits
)

Create a factory for the specified number of radix digits.

private
DfpField(final int
minimal number of decimal digits
decimalDigits
,
final boolean
if true, the transcendental constants for the given precision must be computed (setting this flag to false is RESERVED for the internal recursive call)
computeConstants
)

Create a factory for the specified number of radix digits.

Method Summary

Modifier and TypeMethod and Description
public void
clearIEEEFlags()

Clears the IEEE 854 status flags.

public static Dfp

Returns:

exp(a)
computeExp
(final Dfp
number for which we want the exponential
a
,
final Dfp
constant with value 1 at desired precision
one
)

Compute exp(a).

public static Dfp

Returns:

ln(a)
computeLn
(final Dfp
number for which we want the exponential
a
,
final Dfp
constant with value 1 at desired precision
one
,
final Dfp
constant with value 2 at desired precision
two
)

Compute ln(a).

private static Dfp

Returns:

π
computePi
(final Dfp
constant with value 1 at desired precision
one
,
final Dfp
constant with value 2 at desired precision
two
,
final Dfp
constant with value 3 at desired precision
three
)

Compute π using Jonathan and Peter Borwein quartic formula.

private static void
computeStringConstants(final int
precision at which the string constants mus be computed
highPrecisionDecimalDigits
)

Recompute the high precision string constants.

public Dfp

Returns:

a Dfp with value e
getE
()

Get the constant e.

public Dfp[]

Returns:

a Dfp with value e split in two pieces
getESplit
()

Get the constant e split in two pieces.

public int

Returns:

IEEE 854 status flags
getIEEEFlags
()

Get the IEEE 854 status flags.

public Dfp

Returns:

a Dfp with value ln(10)
getLn10
()

Get the constant ln(10).

public Dfp

Returns:

a Dfp with value ln(2)
getLn2
()

Get the constant ln(2).

public Dfp[]

Returns:

a Dfp with value ln(2) split in two pieces
getLn2Split
()

Get the constant ln(2) split in two pieces.

public Dfp

Returns:

a Dfp with value ln(5)
getLn5
()

Get the constant ln(5).

public Dfp[]

Returns:

a Dfp with value ln(5) split in two pieces
getLn5Split
()

Get the constant ln(5) split in two pieces.

public Dfp

Returns:

a Dfp with value 1
getOne
()

Implements org.apache.commons.math3.Field.getOne.

Get the constant 1.

public Dfp

Returns:

a Dfp with value π
getPi
()

Get the constant π.

public Dfp[]

Returns:

a Dfp with value π split in two pieces
getPiSplit
()

Get the constant π split in two pieces.

public int

Returns:

number of radix digits
getRadixDigits
()

Get the number of radix digits of the Dfp instances built by this factory.

public DfpField.RoundingMode

Returns:

current rounding mode
getRoundingMode
()

Get the current rounding mode.

public Class<? extends FieldElement<Dfp>>
getRuntimeClass()

Implements org.apache.commons.math3.Field.getRuntimeClass.

Returns the runtime class of the FieldElement.

public Dfp

Returns:

a Dfp with value √2
getSqr2
()

Get the constant √2.

public Dfp

Returns:

a Dfp with value √2 / 2
getSqr2Reciprocal
()

Get the constant √2 / 2.

public Dfp[]

Returns:

a Dfp with value √2 split in two pieces
getSqr2Split
()

Get the constant √2 split in two pieces.

public Dfp

Returns:

a Dfp with value √3
getSqr3
()

Get the constant √3.

public Dfp

Returns:

a Dfp with value √3 / 3
getSqr3Reciprocal
()

Get the constant √3 / 3.

public Dfp

Returns:

a Dfp with value 2
getTwo
()

Get the constant 2.

public Dfp

Returns:

a Dfp with value 0
getZero
()

Implements org.apache.commons.math3.Field.getZero.

Get the constant 0.

public Dfp

Returns:

a new Dfp with a value of 0
newDfp
()

Makes a Dfp with a value of 0.

public Dfp

Returns:

a new Dfp with the same value as x
newDfp
(final byte
value to convert to an instance
x
)

Create an instance from a byte value.

public Dfp

Returns:

a new Dfp with the same value as x
newDfp
(final int
value to convert to an instance
x
)

Create an instance from an int value.

public Dfp

Returns:

a new Dfp with the same value as x
newDfp
(final long
value to convert to an instance
x
)

Create an instance from a long value.

public Dfp

Returns:

a new Dfp with the same value as x
newDfp
(final double
value to convert to an instance
x
)

Create an instance from a double value.

public Dfp

Returns:

a new Dfp with the same value as d
newDfp
(Dfp
instance to copy
d
)

Copy constructor.

public Dfp

Returns:

a new Dfp parsed from specified string
newDfp
(final String
string representation of the instance
s
)

Create a Dfp given a String representation.

public Dfp

Returns:

a new Dfp with a non-finite value
newDfp
(final byte
sign of the Dfp to create
sign
,
final byte
code of the value, must be one of Dfp#INFINITE, Dfp#SNAN, Dfp#QNAN
nans
)

Creates a Dfp with a non-finite value.

public void
setIEEEFlags(final int
desired value for the flags
flags
)

Sets the IEEE 854 status flags.

public void
setIEEEFlagsBits(final int
bits to set
bits
)

Sets some bits in the IEEE 854 status flags, without changing the already set bits.

public void
setRoundingMode(final DfpField.RoundingMode
desired rounding mode Note that the rounding mode is common to all Dfp instances belonging to the current DfpField in the system and will affect all future calculations.
mode
)

Set the rounding mode.

private Dfp[]

Returns:

an array of two Dfp instances which sum equals a
split
(final String
string representation of the number to split
a
)

Breaks a string representation up into two Dfp's.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eback to summary
private final Dfp e

A Dfp with value e.

eSplitback to summary
private final Dfp[] eSplit

A two elements Dfp array with value e split in two pieces.

eStringback to summary
private static String eString

High precision string representation of e.

FLAG_DIV_ZEROback to summary
public static final int FLAG_DIV_ZERO

IEEE 854-1987 flag for division by zero.

FLAG_INEXACTback to summary
public static final int FLAG_INEXACT

IEEE 854-1987 flag for inexact result.

FLAG_INVALIDback to summary
public static final int FLAG_INVALID

IEEE 854-1987 flag for invalid operation.

FLAG_OVERFLOWback to summary
public static final int FLAG_OVERFLOW

IEEE 854-1987 flag for overflow.

FLAG_UNDERFLOWback to summary
public static final int FLAG_UNDERFLOW

IEEE 854-1987 flag for underflow.

ieeeFlagsback to summary
private int ieeeFlags

IEEE 854-1987 signals.

ln10back to summary
private final Dfp ln10

A Dfp with value ln(10).

ln10Stringback to summary
private static String ln10String

High precision string representation of ln(10).

ln2back to summary
private final Dfp ln2

A Dfp with value ln(2).

ln2Splitback to summary
private final Dfp[] ln2Split

A two elements Dfp array with value ln(2) split in two pieces.

ln2Stringback to summary
private static String ln2String

High precision string representation of ln(2).

ln5back to summary
private final Dfp ln5

A Dfp with value ln(5).

ln5Splitback to summary
private final Dfp[] ln5Split

A two elements Dfp array with value ln(5) split in two pieces.

ln5Stringback to summary
private static String ln5String

High precision string representation of ln(5).

oneback to summary
private final Dfp one

A Dfp with value 1.

piback to summary
private final Dfp pi

A Dfp with value π.

piSplitback to summary
private final Dfp[] piSplit

A two elements Dfp array with value π split in two pieces.

piStringback to summary
private static String piString

High precision string representation of π.

radixDigitsback to summary
private final int radixDigits

The number of radix digits. Note these depend on the radix which is 10000 digits, so each one is equivalent to 4 decimal digits.

rModeback to summary
private DfpField.RoundingMode rMode

Current rounding mode.

sqr2back to summary
private final Dfp sqr2

A Dfp with value √2.

sqr2Reciprocalback to summary
private final Dfp sqr2Reciprocal

A Dfp with value √2 / 2.

sqr2ReciprocalStringback to summary
private static String sqr2ReciprocalString

High precision string representation of √2 / 2.

sqr2Splitback to summary
private final Dfp[] sqr2Split

A two elements Dfp array with value √2 split in two pieces.

sqr2Stringback to summary
private static String sqr2String

High precision string representation of √2.

sqr3back to summary
private final Dfp sqr3

A Dfp with value √3.

sqr3Reciprocalback to summary
private final Dfp sqr3Reciprocal

A Dfp with value √3 / 3.

sqr3ReciprocalStringback to summary
private static String sqr3ReciprocalString

High precision string representation of √3 / 3.

sqr3Stringback to summary
private static String sqr3String

High precision string representation of √3.

twoback to summary
private final Dfp two

A Dfp with value 2.

zeroback to summary
private final Dfp zero

A Dfp with value 0.

Constructor Detail

DfpFieldback to summary
public DfpField(final int decimalDigits)

Create a factory for the specified number of radix digits.

Note that since the Dfp class uses 10000 as its radix, each radix digit is equivalent to 4 decimal digits. This implies that asking for 13, 14, 15 or 16 decimal digits will really lead to a 4 radix 10000 digits in all cases.

Parameters
decimalDigits:int

minimal number of decimal digits.

DfpFieldback to summary
private DfpField(final int decimalDigits, final boolean computeConstants)

Create a factory for the specified number of radix digits.

Note that since the Dfp class uses 10000 as its radix, each radix digit is equivalent to 4 decimal digits. This implies that asking for 13, 14, 15 or 16 decimal digits will really lead to a 4 radix 10000 digits in all cases.

Parameters
decimalDigits:int

minimal number of decimal digits

computeConstants:boolean

if true, the transcendental constants for the given precision must be computed (setting this flag to false is RESERVED for the internal recursive call)

Method Detail

clearIEEEFlagsback to summary
public void clearIEEEFlags()

Clears the IEEE 854 status flags.

See Also
getIEEEFlags(), setIEEEFlags(int), setIEEEFlagsBits(int), FLAG_INVALID, FLAG_DIV_ZERO, FLAG_OVERFLOW, FLAG_UNDERFLOW, FLAG_INEXACT
computeExpback to summary
public static Dfp computeExp(final Dfp a, final Dfp one)

Compute exp(a).

Parameters
a:Dfp

number for which we want the exponential

one:Dfp

constant with value 1 at desired precision

Returns:Dfp

exp(a)

computeLnback to summary
public static Dfp computeLn(final Dfp a, final Dfp one, final Dfp two)

Compute ln(a). Let f(x) = ln(x), We know that f'(x) = 1/x, thus from Taylor's theorem we have: ----- n+1 n f(x) = \ (-1) (x - 1) / ---------------- for 1 <= n <= infinity ----- n or 2 3 4 (x-1) (x-1) (x-1) ln(x) = (x-1) - ----- + ------ - ------ + ... 2 3 4 alternatively, 2 3 4 x x x ln(x+1) = x - - + - - - + ... 2 3 4 This series can be used to compute ln(x), but it converges too slowly. If we substitute -x for x above, we get 2 3 4 x x x ln(1-x) = -x - - - - - - + ... 2 3 4 Note that all terms are now negative. Because the even powered ones absorbed the sign. Now, subtract the series above from the previous one to get ln(x+1) - ln(1-x). Note the even terms cancel out leaving only the odd ones 3 5 7 2x 2x 2x ln(x+1) - ln(x-1) = 2x + --- + --- + ---- + ... 3 5 7 By the property of logarithms that ln(a) - ln(b) = ln (a/b) we have: 3 5 7 x+1 / x x x \ ln ----- = 2 * | x + ---- + ---- + ---- + ... | x-1 \ 3 5 7 / But now we want to find ln(a), so we need to find the value of x such that a = (x+1)/(x-1). This is easily solved to find that x = (a-1)/(a+1).

Parameters
a:Dfp

number for which we want the exponential

one:Dfp

constant with value 1 at desired precision

two:Dfp

constant with value 2 at desired precision

Returns:Dfp

ln(a)

computePiback to summary
private static Dfp computePi(final Dfp one, final Dfp two, final Dfp three)

Compute π using Jonathan and Peter Borwein quartic formula.

Parameters
one:Dfp

constant with value 1 at desired precision

two:Dfp

constant with value 2 at desired precision

three:Dfp

constant with value 3 at desired precision

Returns:Dfp

π

computeStringConstantsback to summary
private static void computeStringConstants(final int highPrecisionDecimalDigits)

Recompute the high precision string constants.

Parameters
highPrecisionDecimalDigits:int

precision at which the string constants mus be computed

getEback to summary
public Dfp getE()

Get the constant e.

Returns:Dfp

a Dfp with value e

getESplitback to summary
public Dfp[] getESplit()

Get the constant e split in two pieces.

Returns:Dfp[]

a Dfp with value e split in two pieces

getIEEEFlagsback to summary
public int getIEEEFlags()

Get the IEEE 854 status flags.

Returns:int

IEEE 854 status flags

See Also
clearIEEEFlags(), setIEEEFlags(int), setIEEEFlagsBits(int), FLAG_INVALID, FLAG_DIV_ZERO, FLAG_OVERFLOW, FLAG_UNDERFLOW, FLAG_INEXACT
getLn10back to summary
public Dfp getLn10()

Get the constant ln(10).

Returns:Dfp

a Dfp with value ln(10)

getLn2back to summary
public Dfp getLn2()

Get the constant ln(2).

Returns:Dfp

a Dfp with value ln(2)

getLn2Splitback to summary
public Dfp[] getLn2Split()

Get the constant ln(2) split in two pieces.

Returns:Dfp[]

a Dfp with value ln(2) split in two pieces

getLn5back to summary
public Dfp getLn5()

Get the constant ln(5).

Returns:Dfp

a Dfp with value ln(5)

getLn5Splitback to summary
public Dfp[] getLn5Split()

Get the constant ln(5) split in two pieces.

Returns:Dfp[]

a Dfp with value ln(5) split in two pieces

getOneback to summary
public Dfp getOne()

Implements org.apache.commons.math3.Field.getOne.

Get the constant 1.

Returns:Dfp

a Dfp with value 1

getPiback to summary
public Dfp getPi()

Get the constant π.

Returns:Dfp

a Dfp with value π

getPiSplitback to summary
public Dfp[] getPiSplit()

Get the constant π split in two pieces.

Returns:Dfp[]

a Dfp with value π split in two pieces

getRadixDigitsback to summary
public int getRadixDigits()

Get the number of radix digits of the Dfp instances built by this factory.

Returns:int

number of radix digits

getRoundingModeback to summary
public DfpField.RoundingMode getRoundingMode()

Get the current rounding mode.

Returns:DfpField.RoundingMode

current rounding mode

getRuntimeClassback to summary
public Class<? extends FieldElement<Dfp>> getRuntimeClass()

Implements org.apache.commons.math3.Field.getRuntimeClass.

Doc from org.apache.commons.math3.Field.getRuntimeClass.

Returns the runtime class of the FieldElement.

Returns:Class<? extends FieldElement<Dfp>>

The Class object that represents the runtime class of this object.

getSqr2back to summary
public Dfp getSqr2()

Get the constant √2.

Returns:Dfp

a Dfp with value √2

getSqr2Reciprocalback to summary
public Dfp getSqr2Reciprocal()

Get the constant √2 / 2.

Returns:Dfp

a Dfp with value √2 / 2

getSqr2Splitback to summary
public Dfp[] getSqr2Split()

Get the constant √2 split in two pieces.

Returns:Dfp[]

a Dfp with value √2 split in two pieces

getSqr3back to summary
public Dfp getSqr3()

Get the constant √3.

Returns:Dfp

a Dfp with value √3

getSqr3Reciprocalback to summary
public Dfp getSqr3Reciprocal()

Get the constant √3 / 3.

Returns:Dfp

a Dfp with value √3 / 3

getTwoback to summary
public Dfp getTwo()

Get the constant 2.

Returns:Dfp

a Dfp with value 2

getZeroback to summary
public Dfp getZero()

Implements org.apache.commons.math3.Field.getZero.

Get the constant 0.

Returns:Dfp

a Dfp with value 0

newDfpback to summary
public Dfp newDfp()

Makes a Dfp with a value of 0.

Returns:Dfp

a new Dfp with a value of 0

newDfpback to summary
public Dfp newDfp(final byte x)

Create an instance from a byte value.

Parameters
x:byte

value to convert to an instance

Returns:Dfp

a new Dfp with the same value as x

newDfpback to summary
public Dfp newDfp(final int x)

Create an instance from an int value.

Parameters
x:int

value to convert to an instance

Returns:Dfp

a new Dfp with the same value as x

newDfpback to summary
public Dfp newDfp(final long x)

Create an instance from a long value.

Parameters
x:long

value to convert to an instance

Returns:Dfp

a new Dfp with the same value as x

newDfpback to summary
public Dfp newDfp(final double x)

Create an instance from a double value.

Parameters
x:double

value to convert to an instance

Returns:Dfp

a new Dfp with the same value as x

newDfpback to summary
public Dfp newDfp(Dfp d)

Copy constructor.

Parameters
d:Dfp

instance to copy

Returns:Dfp

a new Dfp with the same value as d

newDfpback to summary
public Dfp newDfp(final String s)

Create a Dfp given a String representation.

Parameters
s:String

string representation of the instance

Returns:Dfp

a new Dfp parsed from specified string

newDfpback to summary
public Dfp newDfp(final byte sign, final byte nans)

Creates a Dfp with a non-finite value.

Parameters
sign:byte

sign of the Dfp to create

nans:byte

code of the value, must be one of Dfp#INFINITE, Dfp#SNAN, Dfp#QNAN

Returns:Dfp

a new Dfp with a non-finite value

setIEEEFlagsback to summary
public void setIEEEFlags(final int flags)

Sets the IEEE 854 status flags.

Parameters
flags:int

desired value for the flags

See Also
getIEEEFlags(), clearIEEEFlags(), setIEEEFlagsBits(int), FLAG_INVALID, FLAG_DIV_ZERO, FLAG_OVERFLOW, FLAG_UNDERFLOW, FLAG_INEXACT
setIEEEFlagsBitsback to summary
public void setIEEEFlagsBits(final int bits)

Sets some bits in the IEEE 854 status flags, without changing the already set bits.

Calling this method is equivalent to call setIEEEFlags(getIEEEFlags() | bits)

Parameters
bits:int

bits to set

See Also
getIEEEFlags(), clearIEEEFlags(), setIEEEFlags(int), FLAG_INVALID, FLAG_DIV_ZERO, FLAG_OVERFLOW, FLAG_UNDERFLOW, FLAG_INEXACT
setRoundingModeback to summary
public void setRoundingMode(final DfpField.RoundingMode mode)

Set the rounding mode. If not set, the default value is RoundingMode#ROUND_HALF_EVEN.

Parameters
mode:DfpField.RoundingMode

desired rounding mode Note that the rounding mode is common to all Dfp instances belonging to the current DfpField in the system and will affect all future calculations.

splitback to summary
private Dfp[] split(final String a)

Breaks a string representation up into two Dfp's. The split is such that the sum of them is equivalent to the input string, but has higher precision than using a single Dfp.

Parameters
a:String

string representation of the number to split

Returns:Dfp[]

an array of two Dfp instances which sum equals a

org.apache.commons.math3.dfp back to summary

public final Enum DfpField.RoundingMode

extends Enum<DfpField.RoundingMode>
Class Inheritance

Enumerate for rounding modes.

Field Summary

Modifier and TypeField and Description
public static final DfpField.RoundingMode
ROUND_CEIL

Rounds towards positive infinity.

public static final DfpField.RoundingMode
ROUND_DOWN

Rounds toward zero (truncation).

public static final DfpField.RoundingMode
ROUND_FLOOR

Rounds towards negative infinity.

public static final DfpField.RoundingMode
ROUND_HALF_DOWN

Rounds towards nearest unless both are equidistant in which case it rounds toward zero.

public static final DfpField.RoundingMode
ROUND_HALF_EVEN

Rounds towards nearest unless both are equidistant in which case it rounds toward the even neighbor.

public static final DfpField.RoundingMode
ROUND_HALF_ODD

Rounds towards nearest unless both are equidistant in which case it rounds toward the odd neighbor.

public static final DfpField.RoundingMode
ROUND_HALF_UP

Rounds towards nearest unless both are equidistant in which case it rounds away from zero.

public static final DfpField.RoundingMode
ROUND_UP

Rounds away from zero if discarded digit is non-zero.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DfpField.RoundingMode
public static DfpField.RoundingMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ROUND_CEILback to summary
public static final DfpField.RoundingMode ROUND_CEIL

Rounds towards positive infinity.

ROUND_DOWNback to summary
public static final DfpField.RoundingMode ROUND_DOWN

Rounds toward zero (truncation).

ROUND_FLOORback to summary
public static final DfpField.RoundingMode ROUND_FLOOR

Rounds towards negative infinity.

ROUND_HALF_DOWNback to summary
public static final DfpField.RoundingMode ROUND_HALF_DOWN

Rounds towards nearest unless both are equidistant in which case it rounds toward zero.

ROUND_HALF_EVENback to summary
public static final DfpField.RoundingMode ROUND_HALF_EVEN

Rounds towards nearest unless both are equidistant in which case it rounds toward the even neighbor. This is the default as specified by IEEE 854-1987

ROUND_HALF_ODDback to summary
public static final DfpField.RoundingMode ROUND_HALF_ODD

Rounds towards nearest unless both are equidistant in which case it rounds toward the odd neighbor.

ROUND_HALF_UPback to summary
public static final DfpField.RoundingMode ROUND_HALF_UP

Rounds towards nearest unless both are equidistant in which case it rounds away from zero.

ROUND_UPback to summary
public static final DfpField.RoundingMode ROUND_UP

Rounds away from zero if discarded digit is non-zero.

Constructor Detail

RoundingModeback to summary
private RoundingMode()

Method Detail

valueOfback to summary
public static DfpField.RoundingMode valueOf(String name)
valuesback to summary
public static DfpField.RoundingMode[] values()