verify/float
verify the equality of two floats
Calling Sequence
Parameters
Description
Examples
verify(expr1, expr2, float(n))
verify(expr1, expr2, float(n, opt1, opt2, ...))
expr1, expr2
-
expressions
n
non-negative
opt1, opt2, ...
options passed to testfloat
The verify(expr1, expr2, float(n)) calling sequence returns testfloat(expr1, expr2, n).
The verify(expr1, expr2, float(n, opt1, opt2, ...)) calling sequence returns testfloat(expr1, expr2, n, opt1, opt2, ...).
See testfloat for information regarding the options and how the result is determined.
This verification is not symmetric, as expr2 = 0 causes an absolute error test to be applied by default.
evalb⁡0.2342351243=0.2342351245
false
verify⁡0.2342351243,0.2342351245,float⁡2
true
verify⁡0.2342351243,0.2342351256,float⁡2
false,13.,ulps
verify⁡0.2342351243,0.2342351256,truefalse⁡float⁡2
verify⁡1.234⁢x2+3.114⁢x−2.592,1.235⁢y2−2.591+3.114⁢y,float⁡1,digits=4
The first returns an error because select expects a result of type truefalse:
select⁡verify,12.53236,12.53245,12.5348,12.5351,12.534,float⁡150000.
Error, invalid boolean expression: [false, .164e6, `ulps `]
select⁡verify,12.53236,12.53245,12.5348,12.5351,12.534,truefalse⁡float⁡150000.
12.5348,12.5351
See Also
float
testfloat
type/nonnegative
verify
verify/truefalse
Download Help Document