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 AVicennA
Recipients AVicennA, docs@python, koobs, mark.dickinson, ned.deily, paul.moore, ronaldoussoren, steve.dower, steven.daprano, terry.reedy, tim.golden, zach.ware
Date 2019-12-16.19:04:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576523049.15.0.612807815225.issue39059@roundup.psfhosted.org>
In-reply-to
Content
@mark.dickinson,

1) Where is your "`round` is giving the correct result in all cases"??

>>> round(4.395, 2)
4.39

2) I wrote it in my post using decimal punct:
''' Because, when the decimal string is converted to a binary floating-point number, it's 
    again replaced with a binary approximation:

    Whose exact value is 5.765 --> 5.76499999999999968025576890795491635799407958984375
                                                 &&
                         2.675 --> 2.67499999999999982236431605997495353221893310546875

    It means that, the 76(5) --> 5 replaced in a memory as 4.(999999999999)
                                                 &&
                       67(5) --> 5 replaced in a memory as 4.(999999999999) '''

3) round(2.6749999999999998, 2) --> this is the same with round(2.675, 2).

4) I also have a question for you.. Do you have any suggestion to solve this problem?
History
Date User Action Args
2019-12-16 19:04:09AVicennAsetrecipients: + AVicennA, terry.reedy, paul.moore, ronaldoussoren, mark.dickinson, tim.golden, ned.deily, steven.daprano, docs@python, zach.ware, koobs, steve.dower
2019-12-16 19:04:09AVicennAsetmessageid: <1576523049.15.0.612807815225.issue39059@roundup.psfhosted.org>
2019-12-16 19:04:09AVicennAlinkissue39059 messages
2019-12-16 19:04:08AVicennAcreate