From: wemagor@fmsa.cca.rockwell.com (Wayne Magor)
Subject: Re: Float to Fixed conversions
Date: Mon, 20 Mar 1995 21:29:07 GMT
Date: 1995-03-20T21:29:07+00:00 [thread overview]
Message-ID: <D5rD0K.49u@lazrus.cca.rockwell.com> (raw)
In-Reply-To: D5n06v.D8F@inmet.camb.inmet.com
In article <D5n06v.D8F@inmet.camb.inmet.com>, stt@henning.camb.inmet.com (Tucker Taft) writes:
>
>Conversions between (ordinary) fixed and float can either truncate or round.
>The 'Machine_Rounds attribute of the *target* type "should" tell you
>which one happens, but that attribute is mostly oriented toward operations
>within a type, not conversions between types. Have you checked
>the 'Machine_Rounds attribute of type Fix?
Thanks to you and Robert for your advice on this question. I should have
stated that I am using Ada 83, and I also should have been more clear about
the type used for the attributes:
Fix'Machine_Rounds Rounds the conversion
------------------ ---------------------
DEC Vax Ada 83 FALSE No
DEC Alpha Ada 83 TRUE Yes
Rational Sun Ada 83 FALSE Yes
The use of the value of Fix'Machine_Rounds to decide if an adjustment
should be made before the conversion is apparently not adequate to
guarantee that rounding is always performed. It seems the user must
look at the value after the conversion to determine if the machine
performed rounding. This is unfortunately inconvenient and slow.
Wayne.
next prev parent reply other threads:[~1995-03-20 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-16 22:29 Float to Fixed conversions Wayne Magor
1995-03-18 13:01 ` Tucker Taft
1995-03-20 21:29 ` Wayne Magor [this message]
1995-03-19 1:31 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox