Python 2.0 and teaching precalculus
Kirby Urner
urner at alumni.princeton.edu
Sun Sep 10 12:10:05 EDT 2000
More information about the Python-list mailing list
Sun Sep 10 12:10:05 EDT 2000
- Previous message (by thread): Python 2.0 and teaching precalculus
- Next message (by thread): i found it, sorry
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Kirby Urner <urner at alumni.princeton.edu> wrote: >Erik Max Francis <max at alcyone.com> wrote: > >>Kirby Urner wrote: >> >>> def wiggle(function,input,epsilon=1e-10): >>> """ >>> Accepts a function, value and returns delta f / delta x >>> for small epsilon (default of 1^-10 may be overridden) >> ... >> >>1 seems like a bad choice for an epsilon ... :-) > >Woops. > >Thanks for pointing out the typo. Fixed it at the source >page: http://www.ineterena.com/~pdx4d/ocn/precalc.html > >Of course it's all relative. 1 is really small if your >x's are 10,000,000,000 apart :-D > >Kirby ================== Actually, it was already OK on the web version, but your quick detection of the goof prompted me to follow up on edu-sig: >Here's wiggle(): > >def wiggle(function,input,epsilon=1e-10): > """ > Accepts a function, value and returns delta f / delta x > for small epsilon (default of 1^-10 may be overridden) > """ > return (function(input+epsilon) - function(input))/epsilon Fast reader on comp.lang.python caught the above typo error in my post (web version was OK). Of course 1^-10 is simply 1. Now that I stop to cogitate, I see this could be a real confusion. 1e-10 = 10^-10, just as 1e2 = 10^2 = 100. Need to remind students that #.###e### means #.### x 10**###, obviously not #.###**###. Kirby
- Previous message (by thread): Python 2.0 and teaching precalculus
- Next message (by thread): i found it, sorry
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list