[issue43088] Regression in math.hypot

2021-02-01 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue43088] Regression in math.hypot

2021-01-31 Thread Charles Karney
Charles Karney added the comment: Thanks for the info. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue43088] Regression in math.hypot

2021-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I'd like to know what range of versions this version should apply for. Only 3.8 and 3.9. Prior to that, we used the C compiler's hypot() which tended to be very good but was implementation dependent, only covered the two argument case, and made no par

[issue43088] Regression in math.hypot

2021-01-31 Thread Charles Karney
Charles Karney added the comment: Many thanks! Was the 3.9 version of hypot introduced in 3.0? I'm fixing my code to call sqrt(x**2 + y**2) if necessary and I'd like to know what range of versions this version should apply for. -- ___ Python tra

[issue43088] Regression in math.hypot

2021-01-31 Thread Tim Peters
Tim Peters added the comment: I agree this doesn't occur in 3.10, but think Raymond pasted wrong outputs. Here: Python 3.10.0a4+ (heads/master:64fc105b2d, Jan 28 2021, 15:31:11) [MSC v.1928 64 bit (AMD64)] on win32 >>> x = 0.6102683302836215 >>> y1 = 0.7906090004346522 >>> y2 = y1 + 1e-16 >>

[issue43088] Regression in math.hypot

2021-01-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report. This is fixed in Python 3.10 where your script outputs: [1.1102230246251565e-16, 1.1102230246251565e-16] There isn't much that can be done about it for Python 3.9. -- assignee: -> rhettinger nosy: +rhettinger resolution:

[issue43088] Regression in math.hypot

2021-01-31 Thread Charles Karney
New submission from Charles Karney : It would be nice if math.hypot had the property If 0 < y1 < y2 then math.hypot(x, y1) <= math.hypot(x, y2) This is not the case in python3 with x = 0.6102683302836215 y1 = 0.7906090004346522 y2 = y1 + 1e-16 python2's implementation of math.hypo