[New-bugs-announce] [issue4155] Wrong math calculation
Petr
report at bugs.python.org
Mon Oct 20 22:08:01 CEST 2008
New submission from Petr <bubersson at gmail.com>:
Hi, I've just tried some math functions in python3.0, but there's an
wrong calculation (see the example). sin(pi/4) should be same as
(2^.5)/2, but the result is different in last two digits. I don't know
if it's an expected behaviour and this is my first posted issue.
Python 3.0rc1 (r30rc1:66507, Sep 18 2008, 14:47:08) [MSC v.1500 32 bit
(Intel)]
>>> from math import *
>>> sin(pi/4)==(2**0.5)/2
False
sin(pi/4)==0.70710678118654746
(2**0.5)/2==0.70710678118654757
bubersson
----------
messages: 75002
nosy: bubersson
severity: normal
status: open
title: Wrong math calculation
type: behavior
versions: Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4155>
_______________________________________
More information about the New-bugs-announce
mailing list