[squeak-dev] Quadrangle >> exampleInViewer baby graphics bug
Lawson English
lenglish5 at cox.net
Sun Apr 25 20:29:37 UTC 2010
Lawson English wrote:
> Try:
>
>
> c := Complex real: (1.2 asScaledDecimal:10) imaginary: (1.2
> asScaledDecimal:10).
>
> 10timesRepeat: [c:= c squared].
> c inspect. =>
>
> real:
> 16179076657442150770853527851353155726471298091691031267189857182080975646647625504506668234175586148214521889505305242253040644884123843893796453862895583845336242846950815779868456294176417920312278659887541612423662820348021785747119.6681587347s10
>
> imaginary: 0.0000000000s10
>
> see what I mean? You gotta truncate or it takes forever and/or
> crashes/hangs squeak.
>
Of course, that only works for truncating the decimal, but with the M
set algorithm you don't iterate past |z| > 2 anyway. I use [((z real *
z real) + (z imaginary * z imaginary)<4)] to avoid round off errors from
the internal sqrt calculation...
And I still haven't gotten around to adding etoys behavior to the
original M set morph which was what I was trying to learn how to do
since there's only a few parameters involved as compared to an OGLMorph
with etoys behaviors.
:-/
Lawson
More information about the Squeak-dev
mailing list
|