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: a07f3367d7,47fc49812a5e8e38 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: small example, using complex variables in Ada Date: Thu, 10 Jun 2010 15:27:38 +0200 Organization: Adalog Message-ID: References: <82ljannyeq.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 10 Jun 2010 13:27:49 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="Dn22F68J9CHYFQQlT81DGA"; logging-data="22716"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19hapZ2WsesGtoYlwSADn+p" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) In-Reply-To: Cancel-Lock: sha1:V2tNpL7Z+wF5WwCAGH5P/z7/ZJM= Xref: g2news2.google.com comp.lang.ada:12558 Date: 2010-06-10T15:27:38+02:00 List-Id: Yannick Duch�ne (Hibou57) a �crit : >>> It would be good to state the theoretically correct answer; I hope it's >>> 1.5, not 1.499... :). >> Note that they are mathematically equal (with an inifinite number of 9s) > I'm not using so called Reals, so I am not at ease with details in this > area: is it specified by the Ada standard or by the IEEE standard ? (I > know Ada follows IEEE standard, while may be Ada adds some extra stuff > there) For output, rounding is specified in the standard. And BTW, the standard does not specify IEEE (fortunately, it did not make the same mistake as Java!). It just makes sure that it is not incompatible with IEEE arithmetic, and does provide some facilities for handling signed zeroes, which are present in IEEE, but maybe also provided by other models. > Humor: where did you ever see an infinite sequence in a computer ? > (except in a never-ending loop) > I said "mathematically", because of the "..." that followed the last '9'. But for computers, anybody doing some number crunching should know that computations are not exact, and that 1.49* should be considered the same as 1.5 -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr