Lisp HUG Maillist Archive

The rational function



I can't figure out why (rational 7.2) or (rational 7.20) should produce

7549747/1048576

Any ideas?


Thanks
Bhaskar

Re: The rational function

(rational 72 100) does what I’m guessing you expected.

7.2 is a different number with a much longer binary fraction

On Apr 6, 2020, at 2:36 PM, Ramamoorthi Bhaskar <bhaskar51@gmail.com> wrote:



I can't figure out why (rational 7.2) or (rational 7.20) should produce

7549747/1048576

Any ideas?


Thanks
Bhaskar

------------------
Christopher Riesbeck (he/him/his)
Associate Professor, Computer Science, 
McCormick School of Engineering, Northwestern

Director, MS in Computer Science
Co-director, The Center for Computer Science and Learning Sciences

Home page: https://users.cs.northwestern.edu/~riesbeck
Calendar: https://users.cs.northwestern.edu/~riesbeck/calendar-weekly.html


Updated at: 2020-12-10 08:29 UTC