comp.lang.ada
 help / color / mirror / Atom feed
From: "Dr. Adrian Wrigley" <amtw@linuxchip.demon.co.uk.uk.uk>
Subject: Re: Newbie Q
Date: Tue, 20 Sep 2005 11:52:38 GMT
Date: 2005-09-20T11:52:38+00:00	[thread overview]
Message-ID: <pan.2005.09.20.11.55.20.767425@linuxchip.demon.co.uk.uk.uk> (raw)
In-Reply-To: WXLXe.279644$5N3.247543@bgtnsc05-news.ops.worldnet.att.net

On Tue, 20 Sep 2005 04:09:26 +0000, Jim Rogers wrote:
> The example does not indicate whether Degrees is a fixed point or
> floating point type. This example would work better with a fixed
> point type than with a floating point type because one can always
> know what the minimum delta between two fixed point numbers is.

The minimum step is known as the *small* of the type (RM 3.5.9:8).
The *maximum* smallest step is given by the "delta" of the type,
but implementations are free to choose smaller steps unless an
attribute is applied specifying the "small".

I'm sure you know this, but I had only realized this a few weeks ago
when talking about wanting to address arrays by fixed point types.

I had got the impression that all fixed point values were integer
multiples of the delta, whereas in fact there may be additional
bits of precision used by the type.  This seemed counter-intuitive.

(what is the rationale for delta /= small?)
-- 
Adrian




  parent reply	other threads:[~2005-09-20 11:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20  1:11 Newbie Q Larry Luther
2005-09-20  4:09 ` Jim Rogers
2005-09-20  5:48   ` Martin Dowie
2005-09-20 11:52   ` Dr. Adrian Wrigley [this message]
2005-09-20 13:33     ` Martin Dowie
2005-09-21 17:24     ` Martin Dowie
2005-09-20  4:09 ` Samuel Tardieu
2005-09-20  5:52   ` Simon Wright
2005-09-20  6:28     ` Samuel Tardieu
2005-09-20 16:26   ` Martin Krischik
2005-09-21  7:27     ` Samuel Tardieu
2005-09-20  7:58 ` Dmitry A. Kazakov
replies disabled

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