Python 3.2.2 (default, Sep 5 2011, 21:17:14)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from math import tan, pi
>>> tan(10**100)
-0.4116229628832498
>>> tan((180/pi)*(10**100)) # degrees
2.415162133199225
Of course Python has no chance of getting this right. As Feynman says, you have to multiply 2*pi by 10^100, and throw away the integer part; so the right place to start is a record of pi to 100 decimal places.
(I really need to be more careful; this isn’t the first time I’ve been caught making a trivial error in public, and it’s starting to get embarrassing.)
(For the record)
Of course Python has no chance of getting this right. As Feynman says, you have to multiply 2*pi by 10^100, and throw away the integer part; so the right place to start is a record of pi to 100 decimal places.
(I really need to be more careful; this isn’t the first time I’ve been caught making a trivial error in public, and it’s starting to get embarrassing.)
Well, what I wrote was wrong too—what matters is the non-integer part of 10^100/(2*pi).
A tangent of a constant is 0. No matter how big a constant is.
Are you sure? Because tan(pi/4) = 1, and pi/4 is a constant.
He’s probably using “tangent” to mean derivative.
That’s my working assumption, but you never know.
A working assumption which can explain the observed result, is pretty probable. Update accordingly!
Yes, I use the “tangent” in that sense. Feynman could also.
May I point you to the A Human’s Guide to Words sequence?