From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a2d45f282a1da1c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-18 06:39:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newspeer.monmouth.com!newsswitch.lcs.mit.edu!bloom-beacon.mit.edu!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3F40D70F.13CED347@raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: float with 24-bit resolution References: <3F3CCB0F.543478AF@adrianhoe.nospam.com.my> <3f3cd7f4$1_2@news.tm.net.my> <3F3CE28D.B841A191@raytheon.com> <3F3D10B7.9080707@attbi.com> <3F3D2195.D984062E@raytheon.com> <3F3DA544.7080604@attbi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 18 Aug 2003 08:39:27 -0500 NNTP-Posting-Host: 192.27.48.39 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1061213991 192.27.48.39 (Mon, 18 Aug 2003 08:39:51 CDT) NNTP-Posting-Date: Mon, 18 Aug 2003 08:39:51 CDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:41679 Date: 2003-08-18T08:39:27-05:00 List-Id: "Robert I. Eachus" wrote: > > Right, my only point was that since the LSB difference in distances was > small in any one time interval, errors would build up if you did: > > for t in 1..n loop -- t in milliseconds > X := X + Vx; > Y := Y + Vy; > end loop; > > instead of: > > for t in 1..n loop > X := X0 + t*Vx; > Y := Y0 + t*Vy; > end loop; > I clearly understand the issue with truncation errors [hence the need for better accuracy] but this appears to be getting well away from the OP's problem area. Please also note that your solution assumes a constant velocity vector (which is not the case in the example I provided). > (Of course, you are actually doing this for a set of tracks and looking > for matches.) Only the first part is true, the last half does not apply. > I actually had to explain why the first formulation was > not "more efficient." (Or maybe it was more efficient, just wrong. My > attitude has always been that I don't care how fast you can calculate a > wrong answer.) > What is "right" and "wrong" depends on the application domain so what may be "better" for your application may actually introduce other errors in another. --Mark