comp.lang.ada
 help / color / mirror / Atom feed
From: sjw <simon.j.wright@mac.com>
Subject: Re: Question about ordinary fixed point types.
Date: Tue, 17 Aug 2010 07:35:04 -0700 (PDT)
Date: 2010-08-17T07:35:04-07:00	[thread overview]
Message-ID: <91d38fa6-4782-4e39-8df5-c4ba6d3a4ec7@d8g2000yqf.googlegroups.com> (raw)
In-Reply-To: 2981f976-6252-4d4f-9e6e-b121622cd92f@y11g2000yqm.googlegroups.com

On Aug 16, 11:03 am, Ludovic Brenta <ludo...@ludovic-brenta.org>
wrote:

> However and unfortunately, ARM 3.5.9(21) allows an implementation to
> reject any 'Small that is not a power of two (and, in particular,
> decimal fixed-point types). I'm not sure whether GNAT supports
> arbitrary Smalls; from the doc, it seems that it actually rounds them
> down to a power of two no smaller than 2**(-63).

2**(-63)! That should be OK in this application, then.

The real question for Peter is, what does his target compiler do? If
it does as GNAT does and allows a delta and matching small of
ada.numerics.pi / 2 ** 15 then it makes sense to work in your scheme,
since literal values in the code and values for debug will be in
radians. If it only alows binary smalls, then (I would) work with
delta 2 ** (-15) range -1.0 .. 1.0, ie signed fractions of pi, and
apply the scaling factor as required.



  reply	other threads:[~2010-08-17 14:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-15 21:43 Question about ordinary fixed point types Peter C. Chapin
2010-08-15 21:55 ` Shark8
2010-08-16  0:46   ` Peter C. Chapin
2010-08-16  4:13     ` Jeffrey Carter
2010-08-16  8:57       ` Simon Wright
2010-08-15 22:08 ` Yannick Duchêne (Hibou57)
2010-08-16  1:03   ` Peter C. Chapin
2010-08-16  4:11     ` Jeffrey Carter
2010-08-16 10:03       ` Ludovic Brenta
2010-08-17 14:35         ` sjw [this message]
2010-08-17 15:51           ` Ludovic Brenta
2010-08-16 11:31       ` Peter C. Chapin
2010-08-16  9:23     ` Simon Wright
2010-08-16 15:47       ` Simon Wright
2010-08-17 14:37       ` sjw
2010-08-16 11:02 ` Stephen Leake
2010-08-16 11:29   ` Peter C. Chapin
2010-08-16 12:53     ` Dmitry A. Kazakov
2010-08-16 20:28       ` Peter C. Chapin
2010-08-16 20:58         ` Adam Beneschan
2010-08-16 13:01     ` Dmitry A. Kazakov
2010-08-16 14:28     ` Robert A Duff
2010-08-16 20:31       ` Peter C. Chapin
2010-08-16 23:01         ` Robert A Duff
2010-08-16 23:17           ` Peter C. Chapin
2010-08-17  0:56             ` Robert A Duff
2010-08-17  2:03     ` Stephen Leake
2010-08-20  1:21 ` Yannick Duchêne (Hibou57)
replies disabled

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