verify[float] - verify the equality of two floats
|
Calling Sequence
|
|
verify(expr1, expr2, float(n))
verify(expr1, expr2, float(n, opt1, opt2, ...))
|
|
Parameters
|
|
expr1, expr2
|
-
|
anything, assumed to be of type complex(numeric)
|
n
|
-
|
non-negative
|
opt1, opt2, ...
|
-
|
options passed to testfloat
|
|
|
|
|
Description
|
|
•
|
The verify(expr1, expr2, float(n)) calling sequence returns true if it can determine that the two complex floating-point numbers are approximately equal where the call verify(a, b, float(n)) calls testfloat(a, b, n).
|
•
|
A default false value is a list with the first operand equal to false. This can be tested for by using the type verify(false) or can be converted into the result false by wrapping the test in the filter truefalse.
|
•
|
The options model, test, and digits are described in the testfloat help page and are passed on to testfloat.
|
•
|
This verification is symmetric.
|
•
|
If either expr1 or expr2 is not of type complex(float), then false is returned.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
The first returns an error because select expects a result of type truefalse:
>
|
|
>
|
|
| (5) |
|
|
Download Help Document
Was this information helpful?