From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Modify value - type duration
Date: Thu, 6 Nov 2008 19:33:30 -0600
Date: 2008-11-06T19:33:30-06:00 [thread overview]
Message-ID: <gf05un$rrs$1@jacob-sparre.dk> (raw)
In-Reply-To: nasQk.422242$yE1.14213@attbi_s21
"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> wrote in message
news:nasQk.422242$yE1.14213@attbi_s21...
> Adam Beneschan wrote:
>>
>> Hmmm ... now I wonder why there isn't a Truncation attribute for fixed-
>> point types? Maybe nobody before Andreas ever thought they'd need
>> one. Might be useful. (Also Floor, Ceiling.)
>
> No, I wondered about that long ago.
>
>> A possible problem with the floating-point conversion solution is that
>> there may be cases where you lose accuracy---if, e.g., the largest
>> floating-point type and fixed-point systems supported on the machine
>> are both 64 bits. Since a floating-point number needs room for an
>> exponent, it's possible to define a fixed-point type with more bits in
>> the integer part than can be represented in the mantissa of a floating-
>> point type, e.g.
>
> One must always be careful in such cases that the conversion will not fail
> or lose important bits.
Right, in both cases. Sounds like someone should propose something on
Ada-Comment. (This seems like the sort of small cleanup that could be added
to the next Amendment.)
Randy.
next prev parent reply other threads:[~2008-11-07 1:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-05 21:50 Modify value - type duration Andreas.Schmidl
2008-11-05 22:47 ` Jeffrey R. Carter
2008-11-06 1:03 ` Adam Beneschan
2008-11-06 1:57 ` Jeffrey R. Carter
2008-11-06 21:14 ` Keith Thompson
2008-11-07 1:33 ` Randy Brukardt [this message]
2008-11-07 11:10 ` Ludovic Brenta
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox