[issue1565] round(x,y) doesn't behave as expected, round error

2007-12-07 Thread Shlomo Anglister
Shlomo Anglister added the comment: >>> def my_round(n,i): ... t = n * (10**i) ... s = round(t) ... r = s / (10**i) ... return r ... >>> print my_round(s,2) 1.41 __ Tracker <[EMAIL PROTECTED]> <http:

[issue1565] round(x,y) doesn't behave as expected, round error

2007-12-07 Thread Shlomo Anglister
New submission from Shlomo Anglister: #Round is unexpectedly wrong >>> z = complex(1,1) >>> s=abs(z) >>> round(s,2) 1.4099 -- components: Interpreter Core messages: 58266 nosy: shlomoa severity: normal status: open title: round(x,y) doesn't

[issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss

2018-04-17 Thread Shlomo Anglister
New submission from Shlomo Anglister : Output for python2.7.11 2018-04-12-05:23:08.436252 2018-04-12-05:23:08.436252 Output for python3.4 and python3.6 2018-04-12-05:23:08.436252 2018-04-12-05:23:08.00 -- components: Library (Lib) files: timestamp_decimal_test.py messages: 315385

[issue15443] datetime module has no support for nanoseconds

2018-04-17 Thread Shlomo Anglister
Change by Shlomo Anglister : -- nosy: +anglister ___ Python tracker <https://bugs.python.org/issue15443> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss

2018-04-17 Thread Shlomo Anglister
Shlomo Anglister added the comment: The test code demonstrates that fromutctimestamp(1523510588.436252000) != fromutctimestamp(Decimal(1523510588.436252000)) This is related to issues: 22627 and 23607 but not a duplicate -- ___ Python tracker

[issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss

2018-05-08 Thread Shlomo Anglister
Shlomo Anglister added the comment: Thanks @serhiy.storchaka and @corona10 ! I read it, documented the relation and failed to see the duplication. -- ___ Python tracker <https://bugs.python.org/issue33

[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2018-05-08 Thread Shlomo Anglister
Change by Shlomo Anglister : -- nosy: +anglister ___ Python tracker <https://bugs.python.org/issue23607> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss

2018-05-08 Thread Shlomo Anglister
Shlomo Anglister added the comment: This issue is in review stage for a long time. What's holding it? On Wed, May 9, 2018 at 8:24 AM, Shlomo Anglister wrote: > > Shlomo Anglister added the comment: > > Thanks @serhiy.storchaka and @corona10 ! > I read it, documented the