From: tmoran@bix.com
Subject: Re: choice of fixed point type
Date: 2000/03/03
Date: 2000-03-03T00:00:00+00:00 [thread overview]
Message-ID: <9vTv4.603$zz5.39941@news.pacbell.net> (raw)
In-Reply-To: zGgv4.124$zz5.13407@news.pacbell.net
I asked:
> Is <universal real> / <integer> always treated as a call on
>function "/"(Left : Standard.Duration; Right : Integer)
>return Standard.Duration; ?
It turns out that was merely a problem with a single compiler.
Three out of four compilers said the division was ambiguous.
But, in the absence of any other fixed point types, Ada accepts
Long_Float_Functions.Cos(Long_Float(Ada.Numerics.Pi/integer(i)))
and calculates pi/i as type Duration, then converts that to
a Long_Float and then takes the cosine. That typically means
the argument is not nearly as accurate as the person using
Long_Float would expect, and of course neither is the resulting cos.
next prev parent reply other threads:[~2000-03-03 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-01 0:00 choice of fixed point type tmoran
2000-03-03 0:00 ` tmoran [this message]
2000-03-04 0:00 ` Richard D Riehle
2000-03-05 0:00 ` tmoran
2000-03-06 0:00 ` Robert Dewar
2000-03-06 0:00 ` David W. Glessner
2000-03-06 0:00 ` tmoran
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox