mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
compilation fixes in unsupported
This commit is contained in:
parent
65c59307e2
commit
f6c1841316
@ -116,7 +116,7 @@ void MatrixLogarithmAtomic<MatrixType>::compute2x2(const MatrixType& A, MatrixTy
|
|||||||
// computation in previous branch is inaccurate if A(1,1) \approx A(0,0)
|
// computation in previous branch is inaccurate if A(1,1) \approx A(0,0)
|
||||||
int unwindingNumber = static_cast<int>(ceil((imag(logA11 - logA00) - M_PI) / (2*M_PI)));
|
int unwindingNumber = static_cast<int>(ceil((imag(logA11 - logA00) - M_PI) / (2*M_PI)));
|
||||||
Scalar y = A(1,1) - A(0,0), x = A(1,1) + A(0,0);
|
Scalar y = A(1,1) - A(0,0), x = A(1,1) + A(0,0);
|
||||||
result(0,1) = A(0,1) * (Scalar(2) * internal::atanh2(y,x) + Scalar(0,2*M_PI*unwindingNumber)) / y;
|
result(0,1) = A(0,1) * (Scalar(2) * numext::atanh2(y,x) + Scalar(0,2*M_PI*unwindingNumber)) / y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,14 +183,14 @@ template<typename Scalar, int IsComplex = NumTraits<Scalar>::IsComplex>
|
|||||||
struct matrix_power_unwinder
|
struct matrix_power_unwinder
|
||||||
{
|
{
|
||||||
static inline Scalar run(const Scalar& eival, const Scalar& eival0, int unwindingNumber)
|
static inline Scalar run(const Scalar& eival, const Scalar& eival0, int unwindingNumber)
|
||||||
{ return internal::atanh2(eival-eival0, eival+eival0) + Scalar(0, M_PI*unwindingNumber); }
|
{ return numext::atanh2(eival-eival0, eival+eival0) + Scalar(0, M_PI*unwindingNumber); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Scalar>
|
template<typename Scalar>
|
||||||
struct matrix_power_unwinder<Scalar,0>
|
struct matrix_power_unwinder<Scalar,0>
|
||||||
{
|
{
|
||||||
static inline Scalar run(Scalar eival, Scalar eival0, int)
|
static inline Scalar run(Scalar eival, Scalar eival0, int)
|
||||||
{ return internal::atanh2(eival-eival0, eival+eival0); }
|
{ return numext::atanh2(eival-eival0, eival+eival0); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -92,8 +92,8 @@ void dogleg(
|
|||||||
/* at which the quadratic is minimized. */
|
/* at which the quadratic is minimized. */
|
||||||
bnorm = qtb.stableNorm();
|
bnorm = qtb.stableNorm();
|
||||||
temp = bnorm / gnorm * (bnorm / qnorm) * (sgnorm / delta);
|
temp = bnorm / gnorm * (bnorm / qnorm) * (sgnorm / delta);
|
||||||
temp = temp - delta / qnorm * abs2(sgnorm / delta) + sqrt(abs2(temp - delta / qnorm) + (1.-abs2(delta / qnorm)) * (1.-abs2(sgnorm / delta)));
|
temp = temp - delta / qnorm * numext::abs2(sgnorm / delta) + sqrt(numext::abs2(temp - delta / qnorm) + (1.-numext::abs2(delta / qnorm)) * (1.-numext::abs2(sgnorm / delta)));
|
||||||
alpha = delta / qnorm * (1. - abs2(sgnorm / delta)) / temp;
|
alpha = delta / qnorm * (1. - numext::abs2(sgnorm / delta)) / temp;
|
||||||
algo_end:
|
algo_end:
|
||||||
|
|
||||||
/* form appropriate convex combination of the gauss-newton */
|
/* form appropriate convex combination of the gauss-newton */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user