Java org.apache.commons.math3.util Precision fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.math3.util Precision fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.math3.util Precision.

The text is from its open source code.

Field

doubleEPSILON

Largest double-precision floating-point number such that 1 + EPSILON is numerically equal to 1.

doubleSAFE_MIN
Safe minimum, such that 1 / SAFE_MIN does not overflow.

Method

intcompareTo(double x, double y, double eps)
Compares two numbers given some amount of allowed error.
intcompareTo(final double x, final double y, final int maxUlps)
Compares two numbers given some amount of allowed error.
booleanequals(float x, float y, float eps)
Returns true if both arguments are equal or within the range of allowed error (inclusive).
booleanequals(final float x, final float y, final int maxUlps)
Returns true if both arguments are equal or within the range of allowed error (inclusive).
booleanequals(double x, double y, double eps)
Returns true if there is no double value strictly between the arguments or the difference between them is within the range of allowed error (inclusive).
booleanequals(final double x, final double y, final int maxUlps)
Returns true if both arguments are equal or within the range of allowed error (inclusive).
booleanequals(float x, float y)
Returns true iff they are equal as defined by #equals(float,float,int) equals(x, y, 1) .
booleanequals(double x, double y)
Returns true iff they are equal as defined by #equals(double,double,int) equals(x, y, 1) .
booleanequalsIncludingNaN(float x, float y, float eps)
Returns true if both arguments are NaN or are equal or within the range of allowed error (inclusive).
booleanequalsIncludingNaN(float x, float y, int maxUlps)
Returns true if both arguments are NaN or if they are equal as defined by #equals(float,float,int) equals(x, y, maxUlps) .
booleanequalsIncludingNaN(double x, double y, double eps)
Returns true if both arguments are NaN or are equal or within the range of allowed error (inclusive).
booleanequalsIncludingNaN(double x, double y, int maxUlps)
Returns true if both arguments are NaN or if they are equal as defined by #equals(double,double,int) equals(x, y, maxUlps) .
booleanequalsIncludingNaN(float x, float y)
Returns true if both arguments are NaN or neither is NaN and they are equal as defined by #equals(float,float) equals(x, y, 1) .
booleanequalsIncludingNaN(double x, double y)
Returns true if both arguments are NaN or neither is NaN and they are equal as defined by #equals(double,double) equals(x, y, 1) .
doubleround(double x, int scale, int roundingMethod)
Rounds the given value to the specified number of decimal places.
floatround(float x, int scale, int roundingMethod)
Rounds the given value to the specified number of decimal places.
doubleround(double x, int scale)
Rounds the given value to the specified number of decimal places.
floatround(float x, int scale)
Rounds the given value to the specified number of decimal places.