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!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: getting same output as gfortran, long_float Date: Fri, 01 May 2015 09:47:53 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <871tj020ye.fsf@adaheads.sparre-andersen.dk> References: NNTP-Posting-Host: 109.56.215.87.mobile.3.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: loke.gir.dk 1430466474 27348 109.56.215.87 (1 May 2015 07:47:54 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 1 May 2015 07:47:54 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:j5tWKlHdwO2kCZ/UQs7Kg50lNtE= Xref: news.eternal-september.org comp.lang.ada:25684 Date: 2015-05-01T09:47:53+02:00 List-Id: Nasser M. Abbasi wrote: > Thanks, this is very useful. I noticed small difference in output: > side-by-side: > > Ada: 0.00182898948331047096479195244627343392775491540.. > Mathematica*: 0.00182898948331047096479195244627343392775491540.. > gfortran: 0.00182898948331047112025871115292829927 > > at digit 18, gfortran result is different. But your Ada rational > package gives same result as Mathematica. This tells me your > result is the accurate one ! The problem might be in how quad-double floating point operations work. (But it could of course also be a plain oldfashioned bug in gfortran.) Greetings, Jacob -- »If you're going to have crime, it might as well be organized crime.« -- Lord Vetinari