Fixed reversible power bug
This commit is contained in:
parent
da9bfb77e4
commit
7acc8ed47a
@ -38,12 +38,10 @@ polynomial_variable(X) :-
|
||||
% Returns true if X is a power term, false otherwise.
|
||||
% Fully reversible.
|
||||
%
|
||||
power(P) :-
|
||||
%% Makes this more reversible
|
||||
P = X ^ N,
|
||||
power(P^N) :-
|
||||
%% CPL(FD) library predicate to perform integer comparassions in a reversible way
|
||||
%% If 0 > N succeds, fail, otherwise check if X is a valid variable
|
||||
(zcompare((>), 0, N); polynomial_variable(X)), fail.
|
||||
(zcompare((<), 0, N), polynomial_variable(P)); fail.
|
||||
%% if(zcompare((>), 0, N),
|
||||
%% fail,
|
||||
%% polynomial_variable(X)
|
||||
|
Reference in New Issue
Block a user