From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Another question about fixed point types.
Date: Sun, 29 Aug 2010 08:32:46 +0200
Date: 2010-08-29T08:32:46+02:00 [thread overview]
Message-ID: <op.vh6sgwjeule2fv@garhos> (raw)
In-Reply-To: 4c7991c8$0$2375$4d3efbfe@news.sover.net
Le Sun, 29 Aug 2010 00:45:16 +0200, Peter C. Chapin <chapinp@acm.org> a
écrit:
> That range does not include zero. However, the
> code above compiles and runs fine using GNAT GPL 2010.
I have never used fixed point type in Ada (nor floats by the way, but will
do in the future for sound synthesis).
However, I had a look at the reference, and here is what it says which may
be relevant in your area:
ARM 2005 - 3.5.9 Fixed Point Types - says:
12{base range (of a fixed point type) [partial]} The base range (see
3.5)
of a fixed point type is symmetric around zero, except possibly for an
extra
negative value in some implementations.
If it is symmetric around zero, that should explain your observations, as
I would be very surprised if there would be provision for a hole
somewhere. If it is symmetric around zero, and there is no two disjoint
range, then this is include zero.
A tiny test program which would write first and last of the base type may
tell more.
Hint: note the “possibly for an extra negative value in some
implementations”, which may be important for you as you seems to require
deep understanding of what's going on.
> P.S. The code above is a simplification of the real code, but I believe
> it illustrates the question I have.
Yes, it seems it illustrates fine.
--
“Dual licensing is the Perl's way to disinfect the GNU General Public
Virus!” (anonymous)
next prev parent reply other threads:[~2010-08-29 6:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-28 22:45 Another question about fixed point types Peter C. Chapin
2010-08-29 6:32 ` Yannick Duchêne (Hibou57) [this message]
2010-08-29 11:23 ` Peter C. Chapin
2010-08-29 9:02 ` Phil Thornley
2010-08-29 11:29 ` Peter C. Chapin
2010-08-29 12:31 ` Phil Thornley
2010-08-29 13:49 ` Jeffrey Carter
2010-08-29 14:20 ` Peter C. Chapin
2010-08-29 17:50 ` Phil Thornley
2010-08-29 22:03 ` Peter C. Chapin
2010-08-30 8:50 ` Mark Lorenzen
2010-08-29 10:24 ` Simon Wright
2010-08-29 14:02 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox