[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implementation categories, exact rationals



 | Date: Fri, 14 Oct 2005 15:26:46 -0400
 | From: "John.Cowan" <jcowan@xxxxxxxxxxxxxxxxx>
 | 
 | Aubrey Jaffer scripsit:
 | 
 | > What is the rationale for mandating exact rationals?  Over 15 years I
 | > have written numerical Scheme code for everything from symbolic
 | > algebra to Galois fields to linear systems to optics simulations
 | > without needing exact rationals.
 | > 
 | > A case could be made if (expt -26. 1/3) returned -2.9624960684073702;
 | > but I know of no Scheme implementation that does so.
 | 
 | Why would that be desirable?

Because it is the cube root of -26.  A better example is:
(expt -27 1/3) ==> -3

 | 1.48124803420369+2.5655968538523i
 | (thus Chicken, and Petite Chez just adds a few more significant digits)
 | is a more sensible value.