Quoting John Cowan and then Ray Dillinger:

        Ray Dillinger scripsit:
        
        > As an aside, I'm interested in how this function is
        implemented. 
        
        It probably notices that 1/3 is the reciprocal of an integer,
        and applies an exact method.  (expt 27 2/3) returns
        8.999999999999998.
        
To answer Ray, if you have (expt x p/q) and x is a positive fixnum,
bignum, or ratnum, it takes the qth root of x and sees if it's exact; if
so, it computes (expt (expt x 1/q) p).

And I don't know what John's talking about:

        heine:~/programs/gambc-v4_5_2-devel> gsi
        Gambit v4.5.2
        
        > (expt 27 2/3)
        9

Brad


_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to