for / while else doesn't make sense

Pete Forman petef4+usenet at gmail.com
Tue May 24 14:03:14 EDT 2016


Gregory Ewing <greg.ewing at canterbury.ac.nz> writes:

> Pete Forman wrote:
>> However I am coming from scientific measurements where 1.0 is the
>> stored value for observations between 0.95 and 1.05.
>
> You only know that because you're keeping some extra information in
> your head about what the 1.0 stored in your computer represents. It's
> not inherent in the value itself.

No, that is a real case. Floating point hardware can hold intermediate
values in 80 bit registers before writing the double precision result to
8 bytes of memory. There are compiler switches available to enforce
strict IEEE conformance and discard the intermediate guard digits. By
adhering to those rules the results are predictable (repeatable on other
hardware) but less accurate mathematically speaking.

-- 
Pete Forman



More information about the Python-list mailing list