mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 04:48:45 +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):
|
||||
weight = "%d" % weight
|
||||
elif isinstance(weight, (float, double)):
|
||||
weight = "%f" % weight
|
||||
if not isinstance(weight, str):
|
||||
raise Z3Exception("weight should be a string or an integer")
|
||||
if id is None:
|
||||
|
|
Loading…
Reference in a new issue