comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Simple Real_Time.Time_Span question
Date: 1998/10/14
Date: 1998-10-14T00:00:00+00:00	[thread overview]
Message-ID: <m3r9wb1p8r.fsf@mheaney.ni.net> (raw)
In-Reply-To: 702b25$30a$1@nnrp1.dejanews.com

dennison@telepath.com writes:

> In article <700usk$cht$1@nnrp1.dejanews.com>,
>   dewar@gnat.com wrote:
> 
> > It is odd for a compiler not to choose a sufficient precision for Duration
> > to accurately represent a Time_Span value. Certainly in the case of GNAT,
> > Duration is represented in nanoseconds, and you will not lose any precision
> > following the conversion path you suggest.
> 
> I hate to drag my own thread off topic, but how did you do that? According to
> 9.6(27) Duration has to represent up to 86,400 seconds. For a "classical"
> implementation of a fixed-point type that can represent both 86,400 and
> 0.000_000_001, my poor calculations tell me you'd need at least 47 bits. On a
> 32-bit processor that would be tricky.

GNAT uses 64 bits to implement fixed point types.  One of the reasons
this is nice is that you can have an unsigned, 32 bit fixed point type.










  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 ` David C. Hoos, Sr.
1998-10-13  0:00   ` dennison
1998-10-14  0:00     ` Robert I. Eachus
1998-10-14  0:00       ` Keith Thompson
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     ` Niklas Holsti
1998-10-14  0:00       ` Niklas Holsti
1998-10-13  0:00 ` dennison
1998-10-13  0:00 ` Tucker Taft
1998-10-14  0:00 ` dewar
1998-10-14  0:00   ` dennison
1998-10-14  0:00     ` Matthew Heaney [this message]
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