Python fails on math
tim.wintle at teamrubber.com
Tue Feb 22 14:37:05 CET 2011
On Tue, 2011-02-22 at 05:20 -0800, christian schulze wrote:
> >>> from math import e as e
> >>> from math import sqrt as sqrt
> >>> 2*e*sqrt(3) - 2*e == 2*e*(sqrt(3) - 1)
> I was wondering what exactly is failing here. The math module? Python,
> or the IEEE specifications?
I'm not sure anything is failing as such - the "A==B" operator checks if
values computed by the expressions A and B are equivalent - it doesn't
check if the expressions are equivalent (which you'd obviously need
algebra software to attempt).
(from the rest of your email I'm assuming you know what's actually
More information about the Python-list