0

Is it possible to use pi, e and other non-algebraic real numbers in Z3Py?

I wouldn't want to run any C program, but directly from the Z3 Python API

Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
xiyukagif
  • 13
  • 1
  • Duplicate of https://stackoverflow.com/q/46886468/1166898 – CJ Dennis Aug 10 '18 at 11:15
  • @CJDennis duplicate target does not have an answer. – svgrafov Aug 10 '18 at 14:05
  • @svgrafov If it did I would have raised a close flag. If looks like one of the contributors answered in a comment. – CJ Dennis Aug 10 '18 at 14:19
  • @CJDennis that's a one-year-old question and it is suggested to look at the native Java API. I don't know if there's any similar in Python and I've asked if it was possible to avoid it anyway (because I had read that question) – xiyukagif Aug 10 '18 at 16:18

1 Answers1

1

Non-algebraic numbers are usually not supported by SMT solvers. Having said that, you can get pi in z3 indirectly via trigonometric functions, (sin, cos etc.); but the support is incomplete. (Meaning that the solver is most likely to return unknown for most inputs.)

See this answer for a related question: Support of trigonometric functions ( e.g.: cos, tan) in Z3

alias
  • 28,120
  • 2
  • 23
  • 40