[issue36288] Incorrect answer when using round()

2019-03-14 Thread Zachary Ware


Change by Zachary Ware :


--
components:  -Build

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36288] Incorrect answer when using round()

2019-03-14 Thread Zachary Ware


Zachary Ware  added the comment:

Please see the documentation for `round`, it explains this: 
https://docs.python.org/3/library/functions.html#round

--
nosy: +zach.ware -remi.lapeyre
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: behavior -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36288] Incorrect answer when using round()

2019-03-14 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Thanks for submitting a report MeeranRizvi.

This is the expected behavior, according to the IEEE 754 Python round to 
nearest even integer. This is called the bankers' rounding and is done (I 
think) to limitate the propagation of errors.

I suggest we close this as not a bug.

--
nosy: +remi.lapeyre
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36288] Incorrect answer when using round()

2019-03-14 Thread MeeranRizvi


New submission from MeeranRizvi :

When using round() for calculation it gives the incorrect answer.

For Example:
round(1.5)
>>2(Which is correct)

But when we calculate:
round(2.5)
>>2(Should give 3 right?)

--
components: Build
messages: 337921
nosy: MeeranRizvi
priority: normal
severity: normal
status: open
title: Incorrect answer when using round()
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com