diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2013-01-30 17:34:27 +0100 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-31 20:35:15 +0000 |
commit | d078ae7a5642d5dbc823a79384e8fa56cf94f8e2 (patch) | |
tree | c14906852be076008fb19474af9a969eb4539d52 /scaddins | |
parent | b8c9c63cdc44eba348b52dd3cb2e70d379d23187 (diff) |
resolved fdo#60078 correctly calculate IMCSCH and IMSECH
For the transformation used see
http://de.wikipedia.org/wiki/Sekans_Hyperbolicus_und_Kosekans_Hyperbolicus#Komplexes_Argument
(German only)
Change-Id: If502b7333308069d7fcbe09e954b26ce8b7268b6
(cherry picked from commit b884c2e0185e24fc498827b3a53becea9e646b85)
Reviewed-on: https://gerrit.libreoffice.org/1926
Reviewed-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Tested-by: Kohei Yoshida <kohei.yoshida@gmail.com>
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 08a096794c1a..8fddc7bd2d0a 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -2075,8 +2075,8 @@ void Complex::Sech(void) THROWDEF_RTE_IAE THROW_IAE; double fScale =1.0 / ( cosh( 2.0 * r ) + cos( 2.0 * i )); double r_; - r_ = 2.0 * cosh( 2.0 * r ) * cos( i ) * fScale; - i = - (2.0 * sinh( 2.0 * r ) * sin( i ) * fScale ); + r_ = 2.0 * cosh( r ) * cos( i ) * fScale; + i = - (2.0 * sinh( r ) * sin( i ) * fScale ); r = r_ ; } else @@ -2096,8 +2096,8 @@ void Complex::Csch(void) THROWDEF_RTE_IAE THROW_IAE; double fScale =1.0 / ( cosh( 2.0 * r ) - cos( 2.0 * i )); double r_; - r_ = 2.0 * sinh( 2.0 * r ) * cos( i ) * fScale; - i = - ( 2.0 * cosh( 2.0 * r ) * sin( i ) * fScale ); + r_ = 2.0 * sinh( r ) * cos( i ) * fScale; + i = - ( 2.0 * cosh( r ) * sin( i ) * fScale ); r = r_ ; } else |