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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9b4538cfeb0c3576 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!feeder.erje.net!news.musoftware.de!wum.musoftware.de!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 29 Jul 2010 16:56:47 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Float conversion References: <9e669a3b-1013-4bd1-b372-5f7dfa46d083@f42g2000yqn.googlegroups.com> In-Reply-To: <9e669a3b-1013-4bd1-b372-5f7dfa46d083@f42g2000yqn.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4c5196af$0$6878$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 29 Jul 2010 16:56:47 CEST NNTP-Posting-Host: c66dd56c.newsspool2.arcor-online.net X-Trace: DXC=14CoRNG2:em]l@YUW5NBknA9EHlD;3Ycb4Fo<]lROoRa8kFjLh>_cHTX3jm\iS:j:gU^hi X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:12665 Date: 2010-07-29T16:56:47+02:00 List-Id: On 29.07.10 14:23, Henrique wrote: > package Float_Text_IO is new Ada.Text_IO.Float_IO (Long_Float); (Any reason you didn't instantiate with My_Float?) For illustration, inserting Put(Var3, Aft => 15) and Put(Var4, Aft => 15), I get $ ./test_fpt var3: 9.999000244140625E+02= var4: 9.999000854492188E+02> Choosing 15 digits instead of 6 in the type definition, I get $ ./test_fpt var3: 9.999000000000000E+02= var4: 9.999000000000001E+02> There is always a FPT computation that isn't giving the exact result, since there aren't enough bits for doing real math on any computer, if you try hard enough. Georg