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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Markus_Sch=c3=b6pflin?= Newsgroups: comp.lang.ada Subject: Re: Ada.Numerics, Accuracy of trigonometric functions Date: Fri, 7 Oct 2016 12:40:04 +0200 Organization: Aioe.org NNTP Server Message-ID: <8b7af11f-b738-9945-84e0-8be68f516d5a@spam.spam> References: NNTP-Posting-Host: MdpKeRr+sx3LK7JQiK5aNw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:32033 Date: 2016-10-07T12:40:04+02:00 List-Id: Am 07.10.2016 um 12:23 schrieb Brian Drummond: [...] > C tends to silently coerce "float" to "double" any time you pass a float > argument to a function unless you jump through hoops to make such > coercion impossible. > > So my suspicion is simply that the C program is giving you double > precision. I can see in the generated assembler dump that the libc cosf function is called. So I don't think this is the case. And I get the same result in Ada using Long_Float or Long_Long_Float; see my follow-up. Markus