On 22 Feb., 21:18, Stephen Hansen <me+list/pyt...@ixokai.io> wrote: > 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/ > > signature.asc > < 1 KBAnzeigenHerunterladen
I'd rather say not trivial but simple. I looked at "e" as a simple variable with a finite floating point value. BTW; shame on me, e wasn't supposed to be THE e, but just a random number. (The excercise was a geometry problem, as I was told later.) The problem I had with the output of python was, that both expressions are quite the same. Anyways, thanks for your answers. -- -- http://mail.python.org/mailman/listinfo/python-list