How about adding rational fraction to Python?

Paul Rubin http
Thu Feb 28 18:15:23 EST 2008


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> > Calculating machines that handled
> > floating point are older than Python by far.
> 
> Yes, and they almost universally give the result 1/2 -> 0.5.

Can you name an example of a calculating machine that both:
  1) represents the integer 1 and the real number 1.0 as distinct objects;
and
  2) says 1/2 = 0.5 ?



More information about the Python-list mailing list