Stavros Macrakis wrote: > On Sun, Dec 7, 2008 at 3:51 AM, Wacek Kusnierczyk < > [EMAIL PROTECTED]> wrote: > > >>>> (* (/ 2.0 3.0) 3.0) is not exact either, as aren't (* (/ 2.0 2.0) >>>> >> 2.0)... >> >>> Actually, they *are* all exact in any system using IEEE floats. >>> >> not per definitionem of exactness as of r6rs, as of my understanding. >> (exact? 2.0) is false there. >> >> > > Perhaps you are trolling after all.
got used to it. > We're not discussing Scheme semantics > here, so the technical meaning of "exact" in Scheme is not in question. > > The point is simply that in IEEE floating-point, (2.0/3.0)*3.0 is exactly > equal to 2. > ok. > > PS You can easily explore the behavior of IEEE floating division using R: > > divtest <- function(a,b) > { with( pairs <- expand.grid(a=a,b=b), > pairs[ (a/b)*b != a, ] ) } > > divtest(1:30,1:30) i find it more enlightening to examine and compare the representations bitwise rather than to see just the results. but thanks anyway. vQ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.