➜

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.

作者 tim.peters
收信人 mark.dickinson, rhettinger, serhiy.storchaka, terry.reedy, tim.peters
日期 2020-08-30.05:22:03
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1598764924.08.0.445407505655.issue41513@roundup.psfhosted.org>
In-reply-to
内容
About test_frac.py, I changed the main loop like so:

            got = [float(expected)] # NEW
            for hypot in hypots:
                actual = hypot(*coords)
                got.append(float(actual)) # NEW
                err = (actual - expected) / expected
                bits = round(1 / err).bit_length()
                errs[hypot][bits] += 1
            if len(set(got)) > 1: # NEW
                print(got) # NEW

That is, to display every case where the four float results weren't identical.

Result: nothing was displayed (although it's still running the n=1000 chunk, there's no sign that will change).  None of these variations made any difference to results users actually get.

Even the "worst" of these reliably develops dozens of "good bits" beyond IEEE double precision, but invisibly (under the covers, with no visible effect on delivered results).

So if there's something else that speeds the code, perhaps it's worth pursuing, but we're already long beyond the point of getting any payback for pursuing accuracy.
历史
日期 用户 动作 参数
2020-08-30 05:22:04tim.peters修改recipients: + tim.peters, rhettinger, terry.reedy, mark.dickinson, serhiy.storchaka
2020-08-30 05:22:04tim.peters修改messageid: <1598764924.08.0.445407505655.issue41513@roundup.psfhosted.org>
2020-08-30 05:22:04tim.peters链接issue41513 messages
2020-08-30 05:22:03tim.peters创建