public class ExactTolerance extends Object implements FloatingPointTolerance
AbsoluteErrorBound
,
RelativeErrorBound
,
UlpDistanceBound
EXACT
Constructor and Description |
---|
ExactTolerance() |
Modifier and Type | Method and Description |
---|---|
boolean |
isWithinTolerance(BigDecimal value1,
BigDecimal value2)
Indicates whether the specified values are equal under the tolerance.
|
boolean |
isWithinTolerance(double value1,
double value2)
Indicates whether the specified values are equal under the tolerance.
|
boolean |
isWithinTolerance(float value1,
float value2)
Indicates whether the specified values are equal under the tolerance.
|
public boolean isWithinTolerance(BigDecimal value1, BigDecimal value2)
FloatingPointTolerance
isWithinTolerance
in interface FloatingPointTolerance
value1
- the first value to comparevalue2
- the second value to comparetrue
if the two values lie with the error bounds,
otherwise false
public boolean isWithinTolerance(double value1, double value2)
FloatingPointTolerance
isWithinTolerance
in interface FloatingPointTolerance
value1
- the first value to comparevalue2
- the second value to comparetrue
if the two values lie with the error bounds,
otherwise false
public boolean isWithinTolerance(float value1, float value2)
FloatingPointTolerance
isWithinTolerance
in interface FloatingPointTolerance
value1
- the first value to comparevalue2
- the second value to comparetrue
if the two values lie with the error bounds,
otherwise false
Copyright © 2024 Actian Corporation. All rights reserved.