Closed w31t1 closed 3 years ago
The tan computation does not finished on distinct complex arguments. Thread has to be stopped manually.
tan
import numpy as np import gmpy2 zi = np.float64(54542684160.0) zr = np.float64(1.401298464324817e-45) gmpy2.mpc(np.float64(zr), np.float64(zi)) Out[7]: mpc('1.4012984643248171e-45+54542684160.0j') gmpy2.tan(gmpy2.mpc(np.float64(zr), np.float64(zi))) ^C
mpc('0.0+1.0j')
(Result on version 2.0.8 )
2.0.8
Note: Wolfram Alpha returns complex infinity, MPC 1.2 returns (NaN NaN)
(NaN NaN)
Tested on beta versions 2.1.0b5 and 2.1.0b6 and current master (e1c258c2dcaab88453d2627bd40f00875b511637).
2.1.0b5
2.1.0b6
master
I understand the issue. I'm working on a fix.
Fix to restore 2.0.8 behavior has been committed. Thanks for the report.
Short description
The
tan
computation does not finished on distinct complex arguments. Thread has to be stopped manually.Steps for reproduce:
Expected result
(Result on version
2.0.8
)Note: Wolfram Alpha returns complex infinity, MPC 1.2 returns
(NaN NaN)
Affected versions
Tested on beta versions
2.1.0b5
and2.1.0b6
and currentmaster
(e1c258c2dcaab88453d2627bd40f00875b511637).