New submission from sam-s:
I get this `unittest` failure:
```
Traceback (most recent call last):
File "zzz.py", line 348, in test_opposite
self.assertAlmostEqual(a, b, places=2)
AssertionError: 1.1036640046288428 != 1.0986122886681098 within 2 places
```
This seems incorrect: 1.1036640046288428 rounded off to 2 places is 1.10 and so
is 1.0986122886681098.
E.g., in Lisp:
```
> (round 1.1036640046288428d0 0.01)
110 ;
0.0036640292157588336d0
> (round 1.0986122886681098d0 0.01)
110 ;
-0.001387686744974238d0
```
----------
components: Library (Lib)
messages: 294772
nosy: sam-s
priority: normal
severity: normal
status: open
title: unittest: assertAlmostEqual rounding error
versions: Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com