comp.lang.ada
 help / color / mirror / Atom feed
From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: logarithms on ada
Date: 1997/03/11
Date: 1997-03-11T00:00:00+00:00	[thread overview]
Message-ID: <5g2nfm$euv$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 331F0AF6.31AF@watson.ibm.com


"Norman H. Cohen" <ncohen@watson.ibm.com> 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.




  parent reply	other threads:[~1997-03-11  0:00 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-02  0:00 logarithms on ada Brian R Franklin
1997-03-04  0:00 ` Tom Moran
1997-03-04  0:00 ` John McCabe
1997-03-06  0:00   ` Robert Dewar
1997-03-07  0:00     ` John McCabe
1997-03-07  0:00       ` Robert Dewar
1997-03-09  0:00         ` John McCabe
1997-03-09  0:00           ` Robert Dewar
1997-03-10  0:00             ` John McCabe
1997-03-10  0:00               ` Robert Dewar
1997-03-11  0:00                 ` John McCabe
1997-03-11  0:00                   ` Robert Dewar
1997-03-12  0:00                     ` John McCabe
1997-03-07  0:00   ` Darren C Davenport
1997-03-04  0:00 ` Bob Klungle
1997-03-04  0:00   ` Robert Dewar
1997-03-05  0:00     ` Doug Smith
1997-03-05  0:00       ` Robert Dewar
1997-03-06  0:00         ` Robert A Duff
1997-03-05  0:00           ` John McCabe
1997-03-06  0:00           ` Doug Smith
1997-03-06  0:00           ` Norman H. Cohen
1997-03-08  0:00             ` Robert Dewar
1997-03-08  0:00             ` Robert Dewar
1997-03-11  0:00             ` Richard A. O'Keefe [this message]
1997-03-12  0:00               ` Norman H. Cohen
1997-03-06  0:00           ` Robert Dewar
1997-03-06  0:00       ` Robert A Duff
1997-03-06  0:00         ` Andrew Dunstan
1997-03-10  0:00         ` Doug Smith
1997-03-11  0:00           ` Robert Dewar
1997-03-05  0:00     ` Bob Klungle
1997-03-05  0:00       ` David Shochat
1997-03-05  0:00         ` Robert Dewar
1997-03-06  0:00         ` Robert A Duff
1997-03-06  0:00           ` Robert Dewar
1997-03-05  0:00   ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox