[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.hypot is OK with these inputs.

--
components: Library (Lib)
files: hypot_bug.py
messages: 386043
nosy: cffk
priority: normal
severity: normal
status: open
title: Regression in math.hypot
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file49783/hypot_bug.py

___
Python tracker 
<https://bugs.python.org/issue43088>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 
<https://bugs.python.org/issue43088>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43088] Regression in math.hypot

2021-01-31 Thread Charles Karney


Charles Karney  added the comment:

Thanks for the info.

--

___
Python tracker 
<https://bugs.python.org/issue43088>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com