mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-09 07:00:27 +08:00
Extend the magnitude range of tested numbers in packet math unit tests
This commit is contained in:
parent
d541765e85
commit
3352b8d873
@ -218,8 +218,8 @@ template<typename Scalar> void packetmath_real()
|
||||
|
||||
for (int i=0; i<size; ++i)
|
||||
{
|
||||
data1[i] = internal::random<Scalar>(-1e3,1e3);
|
||||
data2[i] = internal::random<Scalar>(-1e3,1e3);
|
||||
data1[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-3,3));
|
||||
data2[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-3,3));
|
||||
}
|
||||
CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasSin, std::sin, internal::psin);
|
||||
CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasCos, std::cos, internal::pcos);
|
||||
@ -242,8 +242,8 @@ template<typename Scalar> void packetmath_real()
|
||||
|
||||
for (int i=0; i<size; ++i)
|
||||
{
|
||||
data1[i] = internal::random<Scalar>(0,1e6);
|
||||
data2[i] = internal::random<Scalar>(0,1e6);
|
||||
data1[i] = internal::random<Scalar>(0,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));
|
||||
data2[i] = internal::random<Scalar>(0,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6));
|
||||
}
|
||||
if(internal::random<float>(0,1)<0.1)
|
||||
data1[internal::random<int>(0, PacketSize)] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user