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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.germany.com!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: why learn C? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com> <1172161751.573558.24140@h3g2000cwc.googlegroups.com> <546qkhF1tr7dtU1@mid.individual.net> <5ZULh.48$YL5.40@newssvr29.news.prodigy.net> <1175215906.645110.217810@e65g2000hsc.googlegroups.com> <1175230700.925143.28490@n59g2000hsh.googlegroups.com> <6XbPh.4025$u03.802@newssvr21.news.prodigy.net> <1175491660.511530.58430@y80g2000hsf.googlegroups.com> <1175566924.442636.199470@o5g2000hsb.googlegroups.com> Date: Thu, 12 Apr 2007 18:39:30 +0200 Message-ID: <1reb6r7o5dbxg$.jd6d0xjy6146$.dlg@40tude.net> NNTP-Posting-Date: 12 Apr 2007 18:38:41 CEST NNTP-Posting-Host: 2052f14e.newsspool3.arcor-online.net X-Trace: DXC=e4Dm^jd7eIO^B]`=U:WelBMcF=Q^Z^V3H4Fo<]lROoRAFl8W>\BH3YB3[793>I;A?EDNcfSJ;bb[EIRnRBaCddOOiLYD<:A X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:14946 Date: 2007-04-12T18:38:41+02:00 List-Id: On Thu, 12 Apr 2007 15:47:36 GMT, Hyman Rosen wrote: > floating point number that you > write in a program is in fact a rational number, No, this is an incorrect statement. I can build hardware for floating-point numbers with the radix e. These will not be rational numbers. A correct statement is: the floating-point numbers are classes of equivalence of real numbers. These classes are typically intervals and each such interval contains a rational number. But that alone, does not make the job of comparing classes of equivalence much easier. Which is the reason why the notion of structural equivalence (used by templates) is a can of worms. > and therefore > depending on the purpose those numbers will have in the template, > they be represented using small sets of integers in a variety of > ways. The template itself can then assemble these parts into a > floating-point constant and use it. Yes, but see above, you cannot tell which class of equivalence that constant would denote. You cannot enumerate real numbers, so the approach is fundamentally flawed. You need a type to identify the classes because you have to know the delta and the radix when you compare "universal" real literals. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de