Skip to content

Instantly share code, notes, and snippets.

@vysogot
Created July 5, 2011 09:01
Show Gist options
  • Save vysogot/1064512 to your computer and use it in GitHub Desktop.
Save vysogot/1064512 to your computer and use it in GitHub Desktop.
croissant equation in eclipse clp
:- lib(ic).
croissant(X,Y,Z) :-
(X^2+Y^2+Z^2+7*sqrt(5)/2-11/2)^2 - ((1+sqrt(5))*X-7+3*sqrt(5))^2-(1+sqrt(5))^2*Y^2 $= 0,
locate([X,Y,Z], 1e-5).
# one of the solutions
croissant(X,Y,Z).
X = X{0.0 .. 7.4073630564431975e-6}
Y = Y{1.066573563196598 .. 1.0665754743970506}
Z = Z{7.4073630564431975e-6 .. 1.4814726112886395e-5}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment