Date: Jan 20, 2013 5:28 AM
Author: S.K.Mody
Subject: Re: How to avoid wrong answers in simple arithmetic expressions.
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kdgfie$of7$1@newscl01ah.mathworks.com>...
> "SK " <modysk@hotmail.com> wrote in message <kdgb24$a74$1@newscl01ah.mathworks.com>...
>
> >
> > OK. I got it (after some embarrassment). The IEEE 754 format description on Wikipedia was a bit confusing - all those negative powers of 2! It really boils down to - if a number can be represented as a sum of powers of 2, then it has an exact representation - so all integers (within some range) will have an exact representation.
>
> Not exactly. 1 + 2^(-100) cannot be represented by IEEE 754.
>
> Bruno
Note that I said _integers_ within some range.
Best Regards.