comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: Simple Real_Time.Time_Span question
Date: 1998/10/14
Date: 1998-10-14T00:00:00+00:00	[thread overview]
Message-ID: <yec90iissut.fsf@king.cts.com> (raw)
In-Reply-To: EACHUS.98Oct14130031@spectre.mitre.org

eachus@spectre.mitre.org (Robert I. Eachus) writes:
> In article <700ic6$q1p$1@nnrp1.dejanews.com> dennison@telepath.com writes:
>    1) You've got to be kidding!  Converting time to floating point to
> do calculations is what caused problems with the Patriot system in
> Dahran.

A brief summary: floating-point is tricky.

>    2) Any fixed point value can be converted to any floating point
> type.  The precision and accuracy will be determined by the types
> involved.  You seem to be under the impression that (double-precision)
> floating point will be more accurate than Duration.  Assuming that
> Duration is a 64-bit fixed point type (and the annexes encourage such
> an implementation), this will usually not be the case.

But you can't assume this in portable code.  I'm reasonably certain
that there are existing Ada 95 implementations in which Duration is 32
bits -- and the original poster explicitly said that the code would
have to be ported to other implementations.

-- 
Keith Thompson (The_Other_Keith) kst@cts.com <http://www.ghoti.net/~kst> <*>
Qualcomm, San Diego, California, USA  <http://www.qualcomm.com>
I must be a techno-geek.  My mouse is bigger than my phone.




  parent reply	other threads:[~1998-10-14  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-13  0:00 Simple Real_Time.Time_Span question dennison
1998-10-13  0:00 ` Tucker Taft
1998-10-13  0:00 ` dennison
1998-10-13  0:00 ` David C. Hoos, Sr.
1998-10-13  0:00   ` dennison
1998-10-14  0:00     ` Niklas Holsti
1998-10-14  0:00       ` Niklas Holsti
1998-10-14  0:00     ` Robert I. Eachus
1998-10-14  0:00       ` Jonathan Guthrie
1998-10-15  0:00         ` dennison
1998-10-16  0:00           ` Tucker Taft
1998-10-16  0:00             ` dennison
1998-10-16  0:00               ` dewar
1998-10-17  0:00           ` Niklas Holsti
1998-10-14  0:00       ` Keith Thompson [this message]
1998-10-14  0:00 ` dewar
1998-10-14  0:00   ` dennison
1998-10-14  0:00     ` Matthew Heaney
1998-10-14  0:00     ` Robert I. Eachus
1998-10-15  0:00       ` dennison
1998-10-16  0:00         ` Robert I. Eachus
replies disabled

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