I'm trying to integrate z3py into my application. There are assertions that involve small real numbers, such as
solver.add(x <= 1e-6)
Then I got the following error:
File "~/src/solver/z3.py", line 2001, in __le__
a, b = _coerce_exprs(self, other)
File "~/src/solver/z3.py", line 846, in _coerce_exprs
b = s.cast(b)
File "~/src/solver/z3.py", line 1742, in cast
return RealVal(val, self.ctx)
File "~/src/solver/z3.py", line 2526, in RealVal
return RatNumRef(Z3_mk_numeral(ctx.ref(), str(val), RealSort(ctx).ast), ctx)
File "~/src/solver/z3core.py", line 1774, in Z3_mk_numeral
raise Z3Exception(lib().Z3_get_error_msg_ex(a0, err))
src.solver.z3types.Z3Exception: 'parser error'
While the assertion
solver.add(x <= 1e-4)
seems to be fine.
Therefore, I'm guessing that there is some sort of precision limitation in z3. If so, is there an option to let the first assertion go through?
Thanks.