is/2: Arguments are not sufficiently instantiated

346 Views Asked by At

I am trying to write a prolog code to find Bezout constants for gcd.

I tried this code :

gcdCoef(A,B,X,Y) :- Z is A*X + B*Y, gcd(A,B,Z).

but when I Execute the query ?- gcdCoef(12,20,M,N). it gives me the error :

"is/2: Arguments are not sufficiently instantiated"

Note that gcd works properly : gcd(A,B,Z) means gcd(A,B) = Z

what should I do to fix the issue?

0

There are 0 best solutions below