summaryrefslogtreecommitdiff
path: root/examples/api/python/floating_point.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/api/python/floating_point.py')
-rwxr-xr-xexamples/api/python/floating_point.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/api/python/floating_point.py b/examples/api/python/floating_point.py
index c92666c0b..6fb595e34 100755
--- a/examples/api/python/floating_point.py
+++ b/examples/api/python/floating_point.py
@@ -20,8 +20,15 @@ from pycvc4 import kinds
if __name__ == "__main__":
slv = pycvc4.Solver()
+
+ if not slv.supportsFloatingPoint():
+ # CVC4 must be built with SymFPU to support the theory of
+ # floating-point numbers
+ print("CVC4 was not built with floating-point support.")
+ exit()
+
slv.setOption("produce-models", "true")
- slv.setLogic("FP")
+ slv.setLogic("QF_FP")
# single 32-bit precision
fp32 = slv.mkFloatingPointSort(8, 24)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback