Sorry this is a basic question, I'm new to z3.
I wrote a program to find a real solution to a certain equation. Since it should be generated for every equation, I can't simplify the equation to much beforehand. But the program is really slow. It is a long equation, but I only have 4 unknown variables, so I wouldn't expect it to take this long (Similar equations (but shorter) had a much shorter runtime and where done in milliseconds). Did I somehow create a loop or is this equation really to complicated.
(declare-const l1 Real)
(declare-const l0 Real)
(declare-const sqrt0 Real)
(assert
(>= sqrt0 0)
)
(assert
(=
(^ sqrt0 2)
(+
(^ l0 2)
(^ l1 2)
)
)
)
(declare-const sqrt1 Real)
(assert
(>= sqrt1 0)
)
(assert
(=
(^ sqrt1 2)
(-
(^ sqrt0 2)
1)
)
)
(assert
(=
(+
(^
(- 0.625000 l0)
2)
(^
(- 0.414578 l1)
2)
)
(^
(+
(/ 1
(-
(* -2 sqrt0)
(* 2 sqrt1)
)
)
(+
(* 0.5 sqrt0)
(* 0.5 sqrt1)
)
)
2)
)
)
(assert
(=
(+
(^
(- 0.500000 l0)
2)
(^
(- 0.000000 l1)
2)
)
(^
(+
(/ 1
(-
(* -2 sqrt0)
(* 2 sqrt1)
)
)
(+
(* 0.5 sqrt0)
(* 0.5 sqrt1)
)
)
2)
)
)
)
(check-sat)
I tried using the FloatingPoint type with the built in fp.sqrt function, but it didn't make program any faster (Maybe I'm wrong but I also couldn't find a built square function for FLoatingPoint, so I used fp.mul). I hoped using the fp.sqrt function would help alot, as after is should only have two unknown constants.
Thanks in advance and sorry if this is a stupid question.