Open SteveElp opened 4 years ago
(root-obj (+ (* 64 (^ x 2)) (- 63)) 1)
is an algebraic number representing the first root of the polynomial 64*x^2 - 63. You can get a real approximation via Expr::get_decimal_string
.
https://github.com/Z3Prover/z3/blob/6f0a3673574932e5105a5c136bafc148b25fe03c/src/solver/smt_logics.cpp#L24 contains a list of logics for which it is possible to create a solver.
Regarding the segmentation fault: This should be catched in the Z3 C++ API and turned into a C++ exception which can be caught on the Julia side.
I wrote a collection of examples that could help beginners. I wrote those since I could not find the usual "examples" subfolder in the repo.
The output of the last example is more cryptic, since it results in things like "(root-obj (+ (* 64 (^ x 2)) (- 63)) 1)". Any mistake there?