comp.lang.ada
 help / color / mirror / Atom feed
From: Philip Bradley <philip@the-shieling.demon.co.uk>
Subject: Fixed Point Numbers
Date: 1999/05/27
Date: 1999-05-27T00:00:00+00:00	[thread overview]
Message-ID: <z64AzHA$uZT3Ewor@the-shieling.demon.co.uk> (raw)

What is the impact of the differing deltas in the following type
definitions :

type Long_Type is delta 180.0/2**31 range -180.0 .. 180.0;
for Long_Type'Small use 180.0/2**31;
for Long_Type'Size use 32;

and

type Long_Type is delta 256.0/2**31 range 
   -180.0 .. 180.0 - (180.0/2**31);
for Long_Type'Small use 180.0/2**31;
for Long_Type'Size use 32;


The first definition is the desired definition (and compiles using
Gnat).  Unfortunately the 2nd one is as close as I can get using a
different compiler - one I am having to use, but not by choice!

I am really only interested in the effect on the attributes, operators
etc. of Long_type if the 2nd definition is used rather than 1st.  Does
anyone know?


-- 
Philip Bradley




             reply	other threads:[~1999-05-27  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-27  0:00 Philip Bradley [this message]
1999-05-28  0:00 ` Fixed Point Numbers Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1999-05-27  0:00 Robert I. Eachus
1999-06-08  0:00 ` Robert A Duff
1999-06-09  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