Skip to content

Commit e51f130

Browse files
BUG: Fix mistranslated expression in amos.h
Closes gh-46. Thanks to github user hchau630 for identifying the problem and suggesting the fix.
1 parent 33768a0 commit e51f130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/xsf/amos/amos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4132,7 +4132,7 @@ namespace amos {
41324132
continue;
41334133
}
41344134
cs = -zr + std::log(s1);
4135-
cs = (exp(std::real(cs)) / tol) * (cos(std::imag(cs)) + sin(std::imag(cs) * std::complex<double>(0, 1)));
4135+
cs = (exp(std::real(cs)) / tol) * std::complex<double>(cos(std::imag(cs)), sin(std::imag(cs)));
41364136
if (!uchk(cs, *ascle, tol)) {
41374137
y[i - 1] = cs;
41384138
nz -= 1;

0 commit comments

Comments
 (0)