[Curious] Integer division => fraction

David T. Lewis lewis at mail.msen.com
Mon Jun 16 10:20:17 UTC 2003


On Mon, Jun 16, 2003 at 02:32:12PM +1200, Richard A. O'Keefe wrote:
> Does Squeak use a math library which uses only a double-precision
> approximation to pi?  That would account for the magnitude of the
> discrepancy.

Not quite. Squeak uses whatever math library is provided by the C
compiler used to build its VM, and a Squeak Float is a C double. But
Pi is defined in Float class>>initialize, and is represented as a
Squeak Float.

Thus Float>>sin does use a double-precision representation of pi, but
it is actually Squeak that is choosing to do this, not the underlying
math library.

Dave




More information about the Squeak-dev mailing list