public class AbsoluteErrorBound extends Object implements FloatingPointTolerance
Specifically, for two values v1 and v2 and a
non-negative bound e, it is checked whether
Math.abs(v1 - v2) <= e
RelativeErrorBound,
UlpDistanceBoundEXACT| Constructor and Description |
|---|
AbsoluteErrorBound(double epsilon)
Define a fixed bound on the absolute error of two floating point
numbers.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getEpsilon()
Gets the maximum absolute difference allowed between values.
|
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 AbsoluteErrorBound(double epsilon)
epsilon - the fixed bound on the errorcom.pervasive.datarush.graphs.physical.InvalidPropertyValueException - if epsilon is
negative.public boolean isWithinTolerance(float value1,
float value2)
FloatingPointToleranceisWithinTolerance in interface FloatingPointTolerancevalue1 - the first value to comparevalue2 - the second value to comparetrue if the two values lie with the error bounds,
otherwise falsepublic boolean isWithinTolerance(double value1,
double value2)
FloatingPointToleranceisWithinTolerance in interface FloatingPointTolerancevalue1 - the first value to comparevalue2 - the second value to comparetrue if the two values lie with the error bounds,
otherwise falsepublic boolean isWithinTolerance(BigDecimal value1, BigDecimal value2)
FloatingPointToleranceisWithinTolerance in interface FloatingPointTolerancevalue1 - the first value to comparevalue2 - the second value to comparetrue if the two values lie with the error bounds,
otherwise falsepublic double getEpsilon()
Copyright © 2024 Actian Corporation. All rights reserved.