I'm using SWI-Prolog and I'm very new and still learning. Practically speaking, this question is a follow-up to Why can't my rule solve for X in a simple algebraic equation?

I have imported clpq.

?- use_module(library(clpq)). true.

My equation is 6x2 + 7x - 3 = 0, in which x is literally -1.5 or also 1/3 if using the quadratic equation.

?- {(6 * X ^ 2) + (7 * X) - 3 = 0}. {-3+7*X+6*X^2=0}. ?- {(6 * X ^ 2) + (7 * X) - 3 = 0}, R is float(X). ERROR: is/2: Arguments are not sufficiently instantiated

Well, it reduced the equation slightly by changing the subtraction of 3 to the addition of -3, but it didn't solve for X . My first step was to try giving it the answer and seeing if it accepts it.

?- X is -1.5, (6 * X ^ 2) + (7 * X) - 3 =:= 0. X = -1.5.

Hmm... everything looks good there. For completeness, I also ran the quadratic equations. ("Equations" plural because I guess there's no ± operator in Prolog. At least, I couldn't find one.)

?- A is 6, B is 7, C is -3, X is (-B + sqrt((B ^ 2) - (4 * A * C))) / (2 * A). A = 6, B = 7, C = -3, X = 0.3333333333333333. ?- A is 6, B is 7, C is -3, X is (-B - sqrt((B ^ 2) - (4 * A * C))) / (2 * A). A = 6, B = 7, C = -3, X = -1.5.

Okay, everything seems to check out. So, why couldn't cplq solve my equation?