Python fails on math
xcr4cx at googlemail.com
Tue Feb 22 17:40:13 EST 2011
On 22 Feb., 21:18, Stephen Hansen <me+list/pyt... at 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/
> < 1 KBAnzeigenHerunterladen
I'd rather say not trivial but simple.
I looked at "e" as a simple variable with a finite floating point
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.
More information about the Python-list