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

Marko Rauhamaa marko at pacujo.net
Mon Jul 18 06:00:12 EDT 2016


Steven D'Aprano <steve+comp.lang.python at pearwood.info>:

> I think one could better think of Scheme's semantics as a
> poorly-thought out hybrid between traditional numerics and a vague
> approximation to interval arithmetic.

Python programmers (among others) frequently run into issues with
surprising results in floating-point arithmetics. For better or worse,
Scheme has tried to abstract the concept. You don't need to explain the
ideas of IEEE 64-bit floating-point numbers or tie the hands of the
implementation. Instead, what you have is "reliable" arithmetics and
"best-effort" arithmetics, a bit like TCP is "reliable" and UDP is
"best-effort".

"Inexact" means there's a possibility of rounding errors. "Exact" means
no rounding errors were introduced by the limitations of the hardware or
the algorithms. How inexact the inexact results is a complicated topic
for numeric programming.


Marko



More information about the Python-list mailing list