Skip to content

Commit

Permalink
more use of auto
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander committed Nov 30, 2018
1 parent 7435766 commit e4381ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Li5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ std::complex<double> Li5(const std::complex<double>& z)
if (az <= 1.) {
u = -clog(1. - z);
} else { // az > 1.
const std::complex<double> lnz = clog(-z);
const std::complex<double> lnz2 = pow2(lnz);
const std::complex<double> lnz4 = pow2(lnz2);
const auto lnz = clog(-z);
const auto lnz2 = pow2(lnz);
const auto lnz4 = pow2(lnz2);
u = -clog(1. - 1./z);
rest = -1./360.*lnz*(7*PI4 + 10.*PI2*lnz2 + 3.*lnz4);
}
Expand Down
12 changes: 6 additions & 6 deletions src/Li6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,19 @@ std::complex<double> Li6(const std::complex<double>& z)
std::complex<double> u, r;
double sgn = 1;

if (std::abs(z) <= 1.) {
if (az <= 1.) {
u = -clog(1. - z);
} else { // az > 1.
const std::complex<double> lnz = clog(-z);
const std::complex<double> lnz2 = pow2(lnz);
const std::complex<double> lnz4 = pow2(lnz2);
const std::complex<double> lnz6 = lnz2*lnz4;
const auto lnz = clog(-z);
const auto lnz2 = pow2(lnz);
const auto lnz4 = pow2(lnz2);
const auto lnz6 = lnz2*lnz4;
u = -clog(1. - 1./z);
r = -31.*PI6/15120. - 7./720.*PI4*lnz2 - 1./144.*PI2*lnz4 - 1./720.*lnz6;
sgn = -1;
}

const std::complex<double> sum =
const auto sum =
u * (bf[0] +
u * (bf[1] +
u * (bf[2] +
Expand Down

0 comments on commit e4381ca

Please sign in to comment.