[Edu-sig] Python 2.0 and teaching precalculus

Kirby Urner pdx4d@teleport.com
Sun, 10 Sep 2000 09:07:45 -0700


>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