Message61371
George: I think my last post was a bit rude. I apologize if it came across that way.
Mathematical rigor and IEEE-754 recommendations aren't necessarily in conflict here,
though. For example, the natural log function from (0, infinity) to (-infinity,
infinity) extends naturally and uniquely to a continuous function on the closed subset
[0, infinity] of the extended real line---i.e., the real line together with the two extra
points -infinity and infinity. With the appropriate topology, the extended real line is
a perfectly well-defined and well-behaved mathematical object, though of course it's no
longer a field. Since IEEE-754 floats include infinities, it's reasonable, and sometimes
useful, to regard the set of IEEE-floats as a computational model of the extended real
line instead of the reals.
At any rate, I agree with you that log(0) and atanh(1) should raise Python exceptions, at
least for now. But these calculations are qualitatively different from log(-1) and
atanh(2), and it wouldn't be at all unreasonable if they raised a different exception---
e.g. ZeroDivisionError instead of ValueError. |
|
| Date |
User |
Action |
Args |
| 2008-01-21 01:02:15 | mark.dickinson | set | spambayes_score: 0.00442666 -> 0.00442666 recipients:
+ mark.dickinson, gvanrossum, tim_one, Rhamphoryncus, christian.heimes, gmcastil |
| 2008-01-21 01:02:15 | mark.dickinson | set | spambayes_score: 0.00442666 -> 0.00442666 messageid: <1200877335.13.0.434975901325.issue1640@psf.upfronthosting.co.za> |
| 2008-01-21 01:02:13 | mark.dickinson | link | issue1640 messages |
| 2008-01-21 01:02:12 | mark.dickinson | create | |
|