From: Raymond T. <toy...@gm...> - 2008-11-27 13:57:29
|
Sam Steingold wrote: >> * Raymond Toy <gbl.enlzbaq@tznvy.pbz> [2008-11-26 19:49:25 -0500]: >> >>> on a second thought (and the first reading of >>> http://www.lispworks.com/documentation/HyperSpec/Body/f_comp_2.htm), >>> clisp is fine. >>> clisp extends the COMPLEX type to hold different types in real and >>> imaginary parts, and the behavior you observe is consistent with this >>> extension. >>> note that COMPLEX is permitted to return a rational (not a complex), so >>> >>> (let ((x (complex 0))) >>> (check-type x complex)) >>> >>> will signal an error in a compliant implementation. >>> >>> >> But the section on complex says complex returns either a rational or a >> complex. (complex 0.0) returns neither. >> > > yes, and if ANSI CL supported (complex float rational), it would have > said that COMPLEX returns a real or a complex. > This is makes sense. > what I am trying to say is that what you observe is a part of the CLISP > (COMPLEX t t) type extension which is hard to make optional - about as > hard as ripping out the arbitrary precision floats, and about as useful. > Wouldn't most of the issues be fixed just by making COMPLEX apply float contagion on the components? > however, in keeping with out ANSI compliance commitment, > "out" or "our"? Ray |