mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix testing issues with x87 extra precision.
This commit is contained in:
parent
cfd7f9b84a
commit
db8e88c936
@ -190,7 +190,7 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
|||||||
if(!NumTraits<Scalar>::IsComplex)
|
if(!NumTraits<Scalar>::IsComplex)
|
||||||
VERIFY_IS_APPROX(numext::real(m1), m1);
|
VERIFY_IS_APPROX(numext::real(m1), m1);
|
||||||
|
|
||||||
VERIFY((m1.abs().log() == log(abs(m1))).all());
|
VERIFY_IS_APPROX(m1.abs().log() , log(abs(m1)));
|
||||||
|
|
||||||
// VERIFY_IS_APPROX(m1.exp(), std::exp(m1));
|
// VERIFY_IS_APPROX(m1.exp(), std::exp(m1));
|
||||||
VERIFY_IS_APPROX(m1.exp() * m2.exp(), exp(m1+m2));
|
VERIFY_IS_APPROX(m1.exp() * m2.exp(), exp(m1+m2));
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
#include<iostream>
|
#include<iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
template<typename T> EIGEN_DONT_INLINE
|
||||||
|
void kill_extra_precision(T& x) { eigen_assert(&x != 0); }
|
||||||
|
|
||||||
|
|
||||||
template<typename BoxType> void alignedbox(const BoxType& _box)
|
template<typename BoxType> void alignedbox(const BoxType& _box)
|
||||||
{
|
{
|
||||||
/* this test covers the following files:
|
/* this test covers the following files:
|
||||||
@ -37,6 +41,10 @@ template<typename BoxType> void alignedbox(const BoxType& _box)
|
|||||||
BoxType b1(VectorType::Random(dim),VectorType::Random(dim));
|
BoxType b1(VectorType::Random(dim),VectorType::Random(dim));
|
||||||
BoxType b2;
|
BoxType b2;
|
||||||
|
|
||||||
|
kill_extra_precision(b1);
|
||||||
|
kill_extra_precision(p0);
|
||||||
|
kill_extra_precision(p1);
|
||||||
|
|
||||||
b0.extend(p0);
|
b0.extend(p0);
|
||||||
b0.extend(p1);
|
b0.extend(p1);
|
||||||
VERIFY(b0.contains(p0*s1+(Scalar(1)-s1)*p1));
|
VERIFY(b0.contains(p0*s1+(Scalar(1)-s1)*p1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user