From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38d8b4bd1cb45ff X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: choice of fixed point type Date: 2000/03/03 Message-ID: <9vTv4.603$zz5.39941@news.pacbell.net>#1/1 X-Deja-AN: 592769611 References: X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 952108101 206.170.2.144 (Fri, 03 Mar 2000 10:28:21 PST) Organization: SBC Internet Services NNTP-Posting-Date: Fri, 03 Mar 2000 10:28:21 PST Newsgroups: comp.lang.ada Date: 2000-03-03T00:00:00+00:00 List-Id: I asked: > Is / 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.