fixed.unifiedErrorCalculator.bitsOfError
Syntax
Description
fixed.unifiedErrorCalculator.bitsOfError(
returns the bits of error between the approximate value approxValue,refValue)approxValue and
the reference value refValue given by
(refValue-approxValue)/eps(approxValue).
fixed.unifiedErrorCalculator.bitsOfError(
specifies whether to keep the calculated error as approxValue,refValue,keepNaN)NaN. By default, to
indicate the calculated error is significant, the function returns Inf if
the calculated error is NaN.
Examples
Input Arguments
Algorithms
If both
refValueandapproxValueareNaN,Inf, or-Inf, they are treated as equal, and the calculated error is zero.If
approxValueis floating point, theneps(approxValue)returns the floating-point relative accuracy.If
approxValueis an integer data type, theneps(approxValue)returns1.If
approxValueis afiobject, theneps(approxValue)returns the quantized relative accuracy for thefiobject.
Version History
Introduced in R2023b