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: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: logarithms on ada Date: 1997/03/08 Message-ID: #1/1 X-Deja-AN: 223976410 References: <5fcqrs$ius@panther.Gsu.EDU> <331F0AF6.31AF@watson.ibm.com> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-03-08T00:00:00+00:00 List-Id: 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) :-)