This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.wiebe
Recipients Eli.Stevens, mark.dickinson, mark.wiebe
Date 2011-04-04.22:03:53
SpamBayes Score 4.1339452e-05
Marked as misclassified No
Message-id <>
There's no disagreement, since they're different cases. Taking an arbitrary double, rounding to float, then rounding to half definitely has double-rounding issues. (And I would recommend constructing an example to add to the test case to make sure you understand what's going on.) Taking two halfs, doing a primitive arithmetic operation on them as floats, then rounding back to half is what Mark was referring to on the list.

In NumPy I also tried to err more towards accuracy and performance than having each intermediate be strictly half. The einsum function retains intermediate values as floats when operating on half, for example, and that's what I recommended in the documentation.

I'd also suggest adding some more to the test suite here to verify that ties are rounding to the nearest even properly. You can see some tests for this here:
Date User Action Args
2011-04-04 22:03:59mark.wiebesetrecipients: + mark.wiebe, mark.dickinson, Eli.Stevens
2011-04-04 22:03:59mark.wiebesetmessageid: <>
2011-04-04 22:03:53mark.wiebelinkissue11734 messages
2011-04-04 22:03:53mark.wiebecreate