[BUG] Float atan:

Michael S. Klein mklein at alumni.caltech.edu
Fri Jun 11 18:23:09 UTC 1999


I think Scheme has good choices for all of this stuff.
They also have detailed references for rationale.
(Also, the Scheme community is philosophicaly a lot
closer to Smalltalk than Fortran or C).

Scheme declares
	(atan x y)
the same as
	(angle (make-rectangular x y))
(even in implementations without complex numbers) which the R5RS
	http://www.swiss.ai.mit.edu/~jaffer/r5rs_8.html#SEC55
declares that
	 -pi < angle <= pi

This placement of the branchcut is much nicer mathematically that
0 <= angle < 2 pi


VisualWorks 
Complexes theta ranges from 
	-pi/2 < theta <= 3 pi/2

Wheras Points ranges from
	0 <= theta < 2 pi

yet someone decided to coerce between Points and Complex (a bad idea I've 
ranted upon elsewhere).

-- Mike

P.S. Does anybody besides me think that It would be nice to have
exact and inexact numbers in Squeak/Smalltalk ?

mklein at alumni.caltech.edu





More information about the Squeak-dev mailing list