atanh(x) page must be updated about x out of ]-1, 1[
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
From Scilab 5.5.2 to 6.0, atanh() changed:
In Scilab 4.0, ... 5.1.1, ... 5.5.2, we get:
--> atanh([-2 2]')
ans =
- 0.5493061 + 1.5707963i
0.5493061 - 1.5707963i
In Scilab 6.0.x :
--> atanh([-2 2]')
ans =
-0.5493061 + 1.5707963i
0.5493061 + 1.5707963i <<<<<< sign of imag() changed
It is also the Octave 5.1.0 answer.
With Matlab 2016:
>> atanh([-2 2]')
ans =
-0.5493 - 1.5708i <<<<<< sign of imag() still differs
0.5493 + 1.5708i
In addition, for the atanh(-1) and atanh(1) cases:
Scilab 5.5.2:
-------------
-->atanh([-1 1])
Warning : singularity of 'log' or 'tan' function. <<<< With Scilab 6.0, warnings removed (fortunately!)
Warning : singularity of 'log' or 'tan' function.
ans =
- Inf Inf
-->atanh([-1 1 2])
Warning : singularity of 'log' or 'tan' function.
Warning : singularity of 'log' or 'tan' function.
ans =
- Inf + Nani Inf + Nani 0.5493061 - 1.5707963i
Scilab 6.0.x
------------
--> atanh([-1 1 2])
ans =
-Inf Inf 0.5493061 + 1.5707963i
The atanh() help page must be updated
ERROR LOG:
----------
None. Outdated documentation
Apparently these changes are intentional:
https://www.mail-archive.com/dev@lists.scilab.org/msg01172.html
HOW TO REPRODUCE THE BUG:
-------------------------
atanh([-1 1 2])
OTHER INFORMATION:
------------------
Updating the m2sci converter and m2sci_atanh page will also be required.
To be posted as a separate bug report.
Edited by Vincent COUVERT