Python fails on math

Stephen Hansen me+list/python at ixokai.io
Tue Feb 22 21:18:33 CET 2011


On 2/22/11 5:20 AM, christian schulze wrote:
> I just found out, how much Python fails on simple math.

>>>> 2*e*sqrt(3) - 2*e == 2*e*(sqrt(3) - 1)

Everyone else has answered very well, so I won't comment on the actual
question at hand-- it seems to have been answered completely.

But! I shall go all o.O and headscratch at you and our definition of
"simple" when you go write an equation which has a number that is
described both as Irrational and Transcendental in it.

Irrational, transcendental numbers so don't get to be grouped under the
"simple" classification. (That said, you'd run into problems with many
entirely non-Transcendental floating point numbers that have not yet
meditated enough to reach nirvana-- but still).

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20110222/19a5c5d5/attachment.sig>


More information about the Python-list mailing list