help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange problem


From: Przemek Klosowski
Subject: Re: strange problem
Date: Fri, 28 Nov 2003 13:40:01 -0500 (EST)

| It is not just representation. This was hust one in a series of 4000
| matrix multiplications in a script. It gave me the problem of a
| impossible answer,a negative distance in a optical system (this is
| possible just not in the system I'm building).

This is a perfect example why interval arithmetic and/or error-propagation
systems are useful. 

You have a rounding error on the order of machine double precision LSB
(eps=2.2e-16), on a value of 0.01; this is a relative error of 1 in 45
trillion, i.e. inaccuracy comparable to an error of 8 microns in the
Moon-Earth distance (*)

If your final result is that sensitive to rounding errors, I would really 
look carefully at its accuracy.

In an error-calculating system, you'd specify errors together with
your input parameters; the errors will presumably be much larger than the
numerical epsilon. The final result would come with a confidence interval.

You can simulate this by performing your Octave calculation multiple times,
taking your original your input data and modifying them one-at-a-time by
adding and subtracting the error.


(*) How do I know that? Well, there's this great program called 'units'
(comes out of the box with most Linux distributions). 'units -v' gives:

    You have: moondist/(0.01/2e-16)
    You want: micron
            moondist/(0.01/2e-16) = 7.688 micron



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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]