From: Phillip Gawlowski Date: 2008-03-31T21:30:31+09:00 Subject: Re: Is it me or Math::sqrt? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Robert Klemme wrote: | 2008/3/31, Phillip Gawlowski : |> I've replaced ^2 with ** 2, but that doesn't seem to change the |> magnitude of the error (Though, the results "feels" more correct now, so |> thanks for that). | | Is this really true after Peter's response? Looks ok to me: | | irb(main):001:0> Math.sqrt(3 * (16-1)**2) | => 25.9807621135332 | irb(main):002:0> Math.sqrt(3 * (15-0)**2) | => 25.9807621135332 Yeah, the mistake was clearly mine. Fixing my assumption helped with fixing the bug. Though, this time the bug was a PBKAC. A hint should've been that I needed Fixnum#abs to properly calculate the square root required by the algorithm. Which shows that flying solo has its dangers. Thanks for correcting me. :) - -- Phillip Gawlowski -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfw2WIACgkQbtAgaoJTgL/mEACdFRpZKC3v4DxJa2+lDodoGYuN wLcAn13rWNycC4RCnn7V2YeZeR6UQ8vI =5Iq9 -----END PGP SIGNATURE-----