comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: logarithms on ada
Date: 1997/03/08
Date: 1997-03-08T00:00:00+00:00	[thread overview]
Message-ID: <dewar.857828082@merv> (raw)
In-Reply-To: 331F0AF6.31AF@watson.ibm.com


Robert Duff said

<<> Really?  I would think students shouldn't be exposed to floating-point
> (and therefore logs and whatnot) until fairly late in the game.  I know
> *I* don't understand floating point arithmetic very well>>

I have often introduced floating-point fairly early on. One nice
assignment is the following.

Given a function f, compute its integral using Simpson's rule
using successively smaller intervals to see how smaller intervals
give better accuracy.

be prepared for a lot of infinite loops, this does not cconverge absolutley,
but instead after a while starts to diverge as the error of adding
lots of small numbers becomes more important than the inherent error
in the approximation. The trick is to catch it at the right point, which
means looking at second deriviatives.

Of course students need to know some calculus to do this (and knowing
some calculus is, alas, not the same thing as having got a passing grade
on a calculus class) :-)





  parent reply	other threads:[~1997-03-08  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 ` 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           ` Norman H. Cohen
1997-03-08  0:00             ` Robert Dewar
1997-03-08  0:00             ` Robert Dewar [this message]
1997-03-11  0:00             ` Richard A. O'Keefe
1997-03-12  0:00               ` Norman H. Cohen
1997-03-06  0:00           ` Robert Dewar
1997-03-06  0:00           ` Doug Smith
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
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 ` Tom Moran
replies disabled

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