[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interpretation of result
From: |
Sergei Steshenko |
Subject: |
Re: Interpretation of result |
Date: |
Mon, 17 Sep 2012 12:12:39 -0700 (PDT) |
----- Original Message -----
> From: JuanPi <address@hidden>
> To: address@hidden
> Cc:
> Sent: Monday, September 17, 2012 9:59 PM
> Subject: Interpretation of result
>
> Can anybody explain this to a simple mortal who did not take a
> rigorous numerical calculus class?
>
> octave:89> 99999999999999999 - 99999999999999998
> ans = 0
>
> (that is 17 digits) ...
>
> Thanks!!
>
> --
> JuanPi Carbajal
> -----
> "The bad economist pursues a small present good, which will be
> followed by a great evil to come, while the true economist pursues a
> great good to come, at the risk of a small present evil." - Frédéric
> Bastiat
> -----
> http://ailab.ifi.uzh.ch/carbajal/
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
Do you know how floating point numbers are represented in modern computers ?
If not, I suggest to start from here:
https://en.wikipedia.org/wiki/Floating_point .
The concepts to grasp are, first of all, mantissa, exponent, denormalization.
I want to disappoint you even more - generally speaking, in computers we have
a1 + a2 + ... + aN != aN + aN-1 + ... + a1.
Regards,
Sergei.