hello i wrote a code but need help.
kip(A,B) :- A#= 2*B.
?- kip(100,L).
L=50
I wrote almost same thing differently.
kip_v1(A,B) :- A#= (B+1)*(B+1) - B*B -1.
(B+1)(B+1) - BB -1 is 2*B is same for kip but this does not give 50:
?- kip_v1(100,P).
P+1#=_G12699,
P+1#=_G12711,
P^2#=_G12723,
_G12699 in inf.. -1/1..sup,
_G12711*_G12699#=_G12753,
_G12711 in inf.. -1/1..sup,
_G12753 in 101..sup,
101+_G12723#=_G12753,
_G12723 in 0..sup.
anyone to help me this code?
