comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: float with 24-bit resolution
Date: Fri, 15 Aug 2003 16:56:26 GMT
Date: 2003-08-15T16:56:26+00:00	[thread overview]
Message-ID: <3F3D10B7.9080707@attbi.com> (raw)
In-Reply-To: 3F3CE28D.B841A191@raytheon.com

Mark Johnson wrote:

> For example, on one system I simulated, a ship did not move until
> reaching 5 knots because the result of (speed * delta_time) was less
> than the LSB of the distance value. We had to use double precision for
> location (X, Y) for most calculations and then use the MSB portion for
> display on the screen.

Hmmm.  I've solved the same problem by recalculating the predicted 
position whenever needed from the last known position and velocity.  But 
that was in a radar application, where I was doing data fusion, so 
running each location, velocity pair forward made more sense.

> Now - having said all of that, are you still interested in fixed point
> arithmetic, and if so what is the real problem being solved so we can
> suggest a complete answer?

I'll ask the same question a different way.  Using fixed-point 
arithmetic correctly is HARD.  Are you sure you are interested in the 
learning experience you will get?  In Ada, getting the declarations of 
fixed point types correct is not hard, and writing the code for a 
calculation may be very easy.  But you will find you need between ten 
minutes and a day or more to analyze whether the code you wrote does 
what you want.  This has little or nothing to do with Ada, and 
everything to do with error and bounds analysis for fixed-point 
arithmetic.  It is hard, but it is often worth it.  The only two 
operations that can introduce errors are division and type conversion. 
If you choose types correctly, you will often find you have no added 
error from your calculations.  (This is why almost all decent accounting 
packages use fixed-point arithmetic for most operations.)


-- 
"As far as I'm concerned, war always means failure." -- Jacques Chirac, 
President of France
"As far as France is concerned, you're right." -- Rush Limbaugh




  reply	other threads:[~2003-08-15 16:56 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-15 11:59 float with 24-bit resolution mailbox
2003-08-15 12:24 ` Jeffrey Creem
2003-08-15 12:52   ` Adrian Hoe
2003-08-15 12:54     ` Adrian Hoe
2003-08-15 15:01       ` Jeffrey Creem
2003-08-16 15:29         ` Matthew Heaney
2003-08-15 13:39     ` Mark Johnson
2003-08-15 16:56       ` Robert I. Eachus [this message]
2003-08-15 18:08         ` Mark Johnson
2003-08-16  3:30           ` Robert I. Eachus
2003-08-18 13:39             ` Mark Johnson
2003-08-20 21:12               ` Robert I. Eachus
2003-08-21 13:38                 ` Mark Johnson
2003-08-16 15:32         ` Matthew Heaney
2003-08-16 15:26     ` Matthew Heaney
2003-08-15 19:56   ` Simon Wright
2003-08-16  4:21     ` Adrian Hoe
2003-08-16 12:59       ` Jeffrey Creem
2003-08-16 15:35     ` Matthew Heaney
2003-08-17 11:40       ` Simon Wright
2003-08-17 13:46         ` Matthew Heaney
2003-08-18  5:05       ` Adrian Hoe
2003-08-18 13:14         ` Matthew Heaney
2003-08-19  3:09           ` Adrian Hoe
2003-08-19 13:00             ` Matthew Heaney
2003-08-30  5:02           ` Randy Brukardt
2003-09-02 16:05             ` Adrian Hoe
2003-09-03  3:31               ` Matthew Heaney
2003-09-03 20:46                 ` Simon Wright
2003-09-04  1:43                   ` Randy Brukardt
2003-09-04  9:53                     ` Jean-Pierre Rosen
2003-09-05  3:46                       ` Randy Brukardt
2003-09-05 17:16                     ` Warren W. Gay VE3WWG
2003-09-05 19:37                       ` Randy Brukardt
2003-09-06 20:48                         ` Warren W. Gay VE3WWG
2003-09-08  7:53                         ` Dmitry A. Kazakov
2003-09-04  1:45                 ` Randy Brukardt
2003-08-16  3:42   ` Robert I. Eachus
2003-08-16 15:38     ` Matthew Heaney
2003-08-16 16:36       ` Robert I. Eachus
2003-08-16 15:22 ` Matthew Heaney
2003-08-17 11:46   ` Simon Wright
2003-08-18 10:04     ` Martin Dowie
2003-08-20 19:53       ` Robert I. Eachus
2003-08-20 23:36         ` Ludovic Brenta
2003-08-21 13:54           ` Mark Johnson
2003-08-21 14:35             ` Ludovic Brenta
2003-08-22 14:07               ` Mark Johnson
2003-08-22 15:12                 ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox