when I call z3 with the following piece of code
(declare-const x Real)
(assert (> x (* -1.79769 (^ 10.0 308.0))))
(check-sat)
(get-model)
then I get the following, expected (and right) answer:
sat
(model
(define-fun x () Real
(+ 1.0 (* (- (/ 179769.0 100000.0)) (^ 10.0 308.0))))
)
But sometimes I need to solve more complex problems where I need to specify a logic to get the right result, like AUFNIRA
(which supports both integer/real and linear/non-linear arithmetics).
But none of these specific logics support the representation of scientific notation I used here by typing values like (* -1.7 (^ 10.0 308.0))
(which just represents -1.7e308 in the common scientific notation).
In particular, if I just add a set-logic
command obtaining the code below
(set-logic AUFNIRA)
(declare-const x Real)
(assert (> x (* -1.79769 (^ 10.0 308.0))))
(check-sat)
(get-model)
then I get the following error
(error "line 3 column 38: unknown function/constant ^")
sat
(model
)
(note the empty model).
My question is: how is it possible that without specifying a logic the solver supports the power operator ^
and returns the right solution, but if I try to specify any logic then this error is returned?
I mean, if it works when no logic is specified it means that some logic must contain it, am I right? If yes, which logic does contain this operator?
According to this question I have tried all of the following logics:
BOOL, LIA, LRA, NIA, NRA, QF_LRA, QF_NIA, QF_NRA, QF_UFLIA, QF_UFLRA, QF_UFNIA, QF_UFNRA, UFLIRA, UFLRA, UFNIA, AUFNIRA
(yes, even the trivially unrelated one) but none of them seems to support the power operator. How is this possible?
Thank you