I have a similar recursion function:
fillTable(X0,Y0,Yn,Yh):-
checkPoint(X0,Y0),
Ynext = Y0+Yh,
Ynext=<Yn,
fillTable(X0,Ynext,Yn,Yh).
checkPoint(X,Y):-
(-X-1)<Y,
X<0, Y<0,
write(X), writeq(' '), write(Y),write(' in 1 area'),
nl,
!
;
(-X+1)>Y, X>0, Y>0,
write(X),write(' '), write(Y),write(' in 2 area'),
nl,
!
;
write(X),write(' '),write(Y),write(' not in area'),nl.
Where X, Y and other var's are float, but when it's written by write(), it prints -1+0.2+0.2+0.2+... not -0.8, -0.6 or other.
How can I fix it?