Package org.apfloat
Class RoundingHelper
java.lang.Object
org.apfloat.RoundingHelper
Helper class for rounding functions.
- Since:
- 1.7.0
- Version:
- 1.11.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static int
private static boolean
static Apint
roundToInteger
(Apfloat x, RoundingMode roundingMode) static Apfloat
roundToMultiple
(Apfloat x, Apfloat y, RoundingMode roundingMode) static Aprational
roundToMultiple
(Aprational x, Aprational y, RoundingMode roundingMode) static Apfloat
roundToPlaces
(Apfloat x, long places, RoundingMode roundingMode) static Apfloat
roundToPrecision
(Apfloat x, long precision, RoundingMode roundingMode)
-
Constructor Details
-
RoundingHelper
private RoundingHelper()
-
-
Method Details
-
roundToMultiple
public static Apfloat roundToMultiple(Apfloat x, Apfloat y, RoundingMode roundingMode) throws IllegalArgumentException, ArithmeticException, ApfloatRuntimeException -
roundToMultiple
public static Aprational roundToMultiple(Aprational x, Aprational y, RoundingMode roundingMode) throws IllegalArgumentException, ArithmeticException, ApfloatRuntimeException -
roundToPlaces
public static Apfloat roundToPlaces(Apfloat x, long places, RoundingMode roundingMode) throws IllegalArgumentException, ArithmeticException, ApfloatRuntimeException -
roundToPrecision
public static Apfloat roundToPrecision(Apfloat x, long precision, RoundingMode roundingMode) throws IllegalArgumentException, ArithmeticException, ApfloatRuntimeException -
roundToInteger
public static Apint roundToInteger(Apfloat x, RoundingMode roundingMode) throws IllegalArgumentException, ArithmeticException, ApfloatRuntimeException -
compareToHalf
-
compareToHalf
-
isEven
-