From: Tim Vaughan Date: Tue, 26 Apr 2016 21:09:46 +0000 (+1200) Subject: Fixed bugs in c*, cmagsq X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=87f54f6de003167f7bf388232a827bbd01ba24b3;p=forth.jl.git Fixed bugs in c*, cmagsq --- diff --git a/examples/mandelbrot.4th b/examples/mandelbrot.4th index 2767738..254628c 100644 --- a/examples/mandelbrot.4th +++ b/examples/mandelbrot.4th @@ -1,7 +1,7 @@ ( --- Complex integer arithmetic --- ) : c* ( x1 y1 x2 y2 -- x3 y3 ) - swap rot ( x1 x2 y1 y2 ) + swap -rot ( x1 x2 y1 y2 ) 2dup * negate ( x1 x2 y1 y2 -y1y2 ) 4 pick 4 pick * + ( x1 x2 y1 y2 (x1x2-y1y2)) 4 roll 2 roll * ( x2 y1 (x1x2-y1y2) x1y2 ) @@ -16,7 +16,7 @@ : csq 2dup c* ; -; cmagsq ( x1 y1 -- mag ) +: cmagsq ( x1 y1 -- mag ) csq abs ;