Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How to avoid wrong answers in simple arithmetic expressions.
Replies: 13   Last Post: Jan 20, 2013 7:18 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 31
Registered: 12/13/04
Re: How to avoid wrong answers in simple arithmetic expressions.
Posted: Jan 20, 2013 5:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.