Re: Floating point performance issue

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

 



On 2011-12-24 12:11:06 +0100, David Brown wrote:
> On 23/12/11 21:25, Vincent Lefevre wrote:
> >[*] This example isn't much different from
> >
> >   http://www.ima.umn.edu/~arnold/disasters/patriot.html
> >
> >(where all calculations could have been done exactly, if the code
> >were better designed), which lead to 28 people killed.
> 
> This is an example where floating point should not have been used - no
> compiler can warn about such inappropriate use of tools and lack of
> understanding about the job in hand.

Actually it wasn't floating point, but fixed point, i.e. something
like scaled integers. Anyway the problem is the same, whether it is
implemented in fixed point or floating point: an initial error that
accumulates... Now, since you can also use integers to represent
approximations of real values (planes, at least not the latest ones,
use integer arithmetic for their calculations, so you see...), would
you also ban the equality test on integers?

> In defence of the programmer, however, it should be noted that the Patriots
> were never designed for intercepting Scuds, and there were a lot of reasons
> why they did a poor job of it (with issues in the software, electronics and
> mechanics).

If the limitations were properly documented, users would have detected
the potential failure. Or perhaps they didn't RTFM. :)

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux