← 输入框|bugs.python.org|刷新

➜

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.

作者 rhettinger
收信人 Nathaniel Manista, docs@python, mark.dickinson, rhettinger, serhiy.storchaka, steven.daprano, tfish2, tim.peters
日期 2022-04-06.03:58:49
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1649217529.84.0.536417229774.issue47121@roundup.psfhosted.org>
In-reply-to
内容
> isfinite() should return True for all ints, without needing
> to coerce them to float

Whoa there.  You're venturing into changing what those math functions were all about and the core approach to how they operate.

A zigzag to this new direction would need discussion with all the math folks.  Many tools in the math module are thin wrapper around libmath and we never intended to be universal handlers of all numeric types.  We have a lot of functions that start by coercing their input to a float.

My two cents is that this would open an endless can of worms and make everyone pay a time and complexity cost for a feature that almost no one needs.  AFAICT is more of a purity issue than an actual practical need that would warrant separate code paths (for example, we recently closed an issue where someone wanted math.log() to have a separate code path for Fraction inputs where it return log(f.numerator) - log(f.denominator) with the goal of handling fractional values smaller than float_min).
历史
日期 用户 动作 参数
2022-04-06 03:58:49rhettinger修改recipients: + rhettinger, tim.peters, mark.dickinson, steven.daprano, docs@python, serhiy.storchaka, Nathaniel Manista, tfish2
2022-04-06 03:58:49rhettinger修改messageid: <1649217529.84.0.536417229774.issue47121@roundup.psfhosted.org>
2022-04-06 03:58:49rhettinger链接issue47121 messages
2022-04-06 03:58:49rhettinger创建