[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2022-04-05 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, I do consider this a bug, albeit a minor one. I may find time to fix it at some point (but it's fine to leave it closed until that time comes). -- ___ Python tracker

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2022-04-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2022-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: One other thought. The mental model for degrees() is just a simple scaling operation. If done in pure Python, we would get *inf* rather than an OverflowError. I don't see any value in breaking with the obvious substitution: >>> sys.float_info.max

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2022-04-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm not interested in having this move forward. AFAICT it doesn't solve any known user problems (no one has cared about this before or since this issue was opened). It slightly slows the code. And it might break some existing code that wasn't

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2022-04-05 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy -patch type: -> enhancement versions: +Python 3.11 ___ Python tracker ___ ___

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2019-05-06 Thread anthony shaw
anthony shaw added the comment: Francisco, I recommend converting the patch into a GitHub pull request to make it easier to code review. Mark, Raymond, please could you re-review this patch. -- nosy: +anthonypjshaw, rhettinger ___ Python tracker

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2016-10-27 Thread Mark Dickinson
Mark Dickinson added the comment: Actually, here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file45244/math-degrees-overflow.diff ___ Python tracker

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2016-10-27 Thread Mark Dickinson
Mark Dickinson added the comment: Francisco: would you be interested in writing a patch? -- ___ Python tracker ___

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2016-10-27 Thread Mark Dickinson
Mark Dickinson added the comment: I agree in principle. On one hand, it's difficult to care too much, since `math.degrees` is going to be all-but-useless for inputs larger than `1e20` or so anyway (the actual angle represented is getting lost in floating-point noise by that point). OTOH,

[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2016-10-26 Thread Francisco Couzo
New submission from Francisco Couzo: Most functions in the math library raise an OverflowError when the arguments are finite but the result is not. >>> math.exp(sys.float_info.max) Traceback (most recent call last): File "", line 1, in OverflowError: math range error >>>