[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Another precision problem with Mata
in a Mata program I am using the expression
abs((x-y)/z) < 1
where x, y and z are real scalars. Note that in some cases y has been
set to x + z earlier in the program. Although the expression should
evaluate to "false" in these cases, it sometimes does evaluate to "true"
due to roundoff error.
My question now is: Would it be reasonable to code
abs((x-y)/z) < 1-epsilon(1)
Or how would one approach such a problem?
* For searches and help try: