Chris Angelico <ros...@gmail.com>:

> Ah. Okay. So in theory, you could have exact float literals and
> inexact integer literals, if you tag them in some way:
>
> 300   ; Exactly 300
> 300!  ; Inexact - roughly 300
> 3.0  ; Exactly three
> 3.0!  ; Roughly three and zero tenths

In Scheme:

   #e300
   #i300
   #e3.0
   #i3.0

In principle, a Scheme implementation could have exact algebraic numbers
spiked with exact constants like e and π. In practice, exact numbers are
integers and rationals, while inexact numbers are floats and complex
numbers. It is a matter of opinion whether the conceptual abstraction is
worth the confusion.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to