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: What am I missing here?
Replies: 5   Last Post: Jan 28, 2013 11:03 AM

Advanced Search

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

Posts: 5,877
Registered: 12/7/04
Re: What am I missing here?
Posted: Jan 26, 2013 8:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Gautam Sethi <gautamsethi@gmail.com> wrote in message <e0cb6636-306e-4239-a3c6-be062decdcea@googlegroups.com>...
> Folks, this is driving me nuts! Can someone explain what may be going on? ......
- - - - - - - - -
Welcome to the world of binary arithmetic, which is what your computer is using. It cannot get an exact result for .1, .2, .3, and .4, just as your decimal calculator cannot get an exact result for 1/3. All of your findings stem from that and the different roundings that are a consequence. Remember that the "==" and 'intersect' operations expect exact equality right down to the smallest bit.

Roger Stafford



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.