[Python-ideas] PEP 485: A Function for testing approximate equality

Nikolaus Rath Nikolaus at rath.org
Fri Feb 6 17:24:36 CET 2015


Nathaniel Smith <njs-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org> writes:
> It's an observable fact, though, that people generally do take care to
> ensure that their numbers are within a few orders of magnitude of 1,
> e.g. by choosing appropriate units, log-transforming, etc.

Do you have a credible source for that, or are you just speculating? At
least in my field I'm regularly working with e.g. particle densities in
the order of 10^19, and I've never seen anyone log-transforming these
numbers (let alone inventing new units for them).

> You could just as reasonably ask why in the world SI prefixes exist
> when we have access to scientific notation. And I wouldn't know the
> answer :-). But they do!

Because they are shorter to write, and easier to parse. Compare

 3.12 x 10^-6 s

(13 characters, not counting ^) with

 3.12 µs

(7 characters).

HTH,
-Nikolaus
-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«


More information about the Python-ideas mailing list