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 intstatic intprivate static booleanstatic ApintroundToInteger(Apfloat x, RoundingMode roundingMode) static ApfloatroundToMultiple(Apfloat x, Apfloat y, RoundingMode roundingMode) static AprationalroundToMultiple(Aprational x, Aprational y, RoundingMode roundingMode) static ApfloatroundToPlaces(Apfloat x, long places, RoundingMode roundingMode) static ApfloatroundToPrecision(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
-