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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e70c13232dc4a26 X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) Subject: Re: logarithms on ada Date: 1997/03/11 Message-ID: <5g2nfm$euv$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 224578118 References: <5fcqrs$ius@panther.Gsu.EDU> <331F0AF6.31AF@watson.ibm.com> Organization: Comp Sci, RMIT University, Melbourne, Australia. Newsgroups: comp.lang.ada NNTP-Posting-User: ok Date: 1997-03-11T00:00:00+00:00 List-Id: "Norman H. Cohen" writes: >In most applications, you don't have to understand all the subtleties of >floating-point arithmetic to use floating point. An age-old >introductory programming assignment is to read three floating-point >numbers A, B, and C, and print (approximations of) the solutions to the >quadratic equation A * x**2 + B * x + C = 0. How very subtle of Norman Cohen to cite the very example that goes disastrously wrong if you don't understand the problems of floating point. (At the very least you have to know what "cancellation" means. And you also have to know about a less direct way to get the "other" answer.) >Students doing this assignment have to know where to find >Ada.Numerics.Elementary_Functions.Sqrt. They don't have to know how to >determine convergence of Newton's alogrithm for square roots. But they do need to understand "cancellation". -- Will maintain COBOL for money. Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.