mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
accepting floats
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
279621c1d7
commit
57ebf7bd38
|
@ -6712,6 +6712,8 @@ class Optimize(Z3PPObject):
|
||||||
"""
|
"""
|
||||||
if _is_int(weight):
|
if _is_int(weight):
|
||||||
weight = "%d" % weight
|
weight = "%d" % weight
|
||||||
|
elif isinstance(weight, (float, double)):
|
||||||
|
weight = "%f" % weight
|
||||||
if not isinstance(weight, str):
|
if not isinstance(weight, str):
|
||||||
raise Z3Exception("weight should be a string or an integer")
|
raise Z3Exception("weight should be a string or an integer")
|
||||||
if id is None:
|
if id is None:
|
||||||
|
|
Loading…
Reference in a new issue