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!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Everything You Know Is Wrong Date: Wed, 2 Mar 2016 15:23:08 +0100 Organization: A noiseless patient Spider Message-ID: References: <87twkrpvcf.fsf@adaheads.sparre-andersen.dk> <9974be39-f94d-4293-819e-bd1c9a1ddd65@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 2 Mar 2016 14:20:09 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="45bffd6a911624777cad79aac3181090"; logging-data="30642"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SXZ7UeCuI4MemYjGdnpCX" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <9974be39-f94d-4293-819e-bd1c9a1ddd65@googlegroups.com> Cancel-Lock: sha1:fZncz+FdL8hIUeEEAJkaioUHAzk= Xref: news.eternal-september.org comp.lang.ada:29645 Date: 2016-03-02T15:23:08+01:00 List-Id: Le 02/03/2016 15:11, vincent.diemunsch@gmail.com a écrit : > Here is the point about Ada : > > Remarkably enough, some languages don't clearly specify that if x is a > floating-point variable (with say a value of 3.0/10.0), then every occurrence > of (say) 10.0*x must have the same value. For example Ada, which is based > on Brown's model, seems to imply that floating-point arithmetic only has to > satisfy Brown's axioms, and thus expressions can have one of many possible > values. Thinking about floating-point in this fuzzy way stands in sharp > contrast to the IEEE model, where the result of each floating-point operation is > precisely defined. In the IEEE model, we can prove that (3.0/10.0)*10.0 > evaluates to 3 (Theorem 7). In Brown's model, we cannot. > > Maybe this could be a topic for a new revision of Ada ? This was a deliberate decision, to make Ada compatible with various floating point models. Many (most? all?) number crunching machines do not have IEEE arithmetic, and there has been famous papers claiming that Java requiring IEEE arithmetic was a huge mistake. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr