[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Machine epsilon, Octave and Matlab
From: |
Craig Stoudt |
Subject: |
Machine epsilon, Octave and Matlab |
Date: |
Wed, 29 Aug 2001 11:38:08 -0700 (PDT) |
I have a question about the way Octave handles
arithmetic operations around machine epsilon.
Consider the expression 1/(1-x) - 1/(1+x)
Let x = eps/2.
Since x < eps, when you evaluate this expression in
Octave, the result is zero. Not surprising. However,
if you evaluate the same expression in Matlab 6.1, you
get 2.220446049250313e-016 which is eps, which is
pretty close to the correct answer. If one evaluates
the expression at eps/4, Matlab yields zero, the same
as Octave (the correct answer is approximately eps/2).
I'm just curious about the difference in results
between Matlab and Octave at x = eps/2
Craig Stoudt
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Machine epsilon, Octave and Matlab,
Craig Stoudt <=
- Re: Machine epsilon, Octave and Matlab, geraint . p . bevan . itar, 2001/08/29
- Re: Machine epsilon, Octave and Matlab, Craig Stoudt, 2001/08/29
- Re: Machine epsilon, Octave and Matlab, geraint . p . bevan . itar, 2001/08/29
- Re: Machine epsilon, Octave and Matlab, Thomas Shores, 2001/08/29
- Re: Machine epsilon, Octave and Matlab, Christoph Spiel, 2001/08/30
- Re: Machine epsilon, Octave and Matlab, Thomas Shores, 2001/08/30
- Re: Machine epsilon, Octave and Matlab, John W. Eaton, 2001/08/30
- Re: Machine epsilon, Octave and Matlab, Geraint Bevan, 2001/08/30
- Re: Machine epsilon, Octave and Matlab, John W. Eaton, 2001/08/30
- Re: Machine epsilon, Octave and Matlab, Alex Verstak, 2001/08/30