What exactly is "exact" (was Clean Singleton Docstrings)

Chris Angelico rosuav at gmail.com
Mon Jul 18 00:35:48 EDT 2016


On Mon, Jul 18, 2016 at 2:16 PM, Rustom Mody <rustompmody at gmail.com> wrote:
> On Saturday, July 16, 2016 at 3:16:48 PM UTC+5:30, Steven D'Aprano wrote:
> Here are the first couple of hits it gives (me) for “scheme exact number”
>
> | Scheme integers can be exact and inexact. For example, a number
> | written as 3.0 with an explicit decimal-point is inexact, but it
> | is also an integer.
>
> AIUI…
> There are two almost completely unrelated notions of exact
>
> 1. ⅓ in decimal cannot be exactly represented though 0.3 0.33 etc are approximations.
>    We could call these inexact forms of ⅓
>
> 2. Measurement and observation produces numbers.  These are inexact inherently.
>
> Scheme's notion of exact is towards capturing the second notion.

Why does that mean that 3.0 is inexact? In what way is 3.0 "inexact"?
It's an exact value representing the integer three.

ChrisA



More information about the Python-list mailing list