Check whether lhs and rhs are equal to within the specified number
of significant digits. Both lhs and rhs can be floating-point
numbers, complex numbers, or input ranges of floating-point or
complex numbers.
assert (matchDigits(0.1234567, 0.1234568));
Note that numbers which are very close to zero should normally be
compared using an absolute difference criterion. This can be
specified using an optional parameter, and is by default set to 1e-20.
Set it to zero if you do not want to use the absolute difference at all.
Check whether lhs and rhs are equal to within the specified number of significant digits. Both lhs and rhs can be floating-point numbers, complex numbers, or input ranges of floating-point or complex numbers.
Note that numbers which are very close to zero should normally be compared using an absolute difference criterion. This can be specified using an optional parameter, and is by default set to 1e-20. Set it to zero if you do not want to use the absolute difference at all.