From 3352b8d873b8639e5cf71bfd3a312dee4a63b0ba Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 13 Jun 2013 18:12:58 +0200 Subject: [PATCH] Extend the magnitude range of tested numbers in packet math unit tests --- test/packetmath.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 78a974e25..2c0519c41 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -218,8 +218,8 @@ template void packetmath_real() for (int i=0; i(-1e3,1e3); - data2[i] = internal::random(-1e3,1e3); + data1[i] = internal::random(-1,1) * std::pow(Scalar(10), internal::random(-3,3)); + data2[i] = internal::random(-1,1) * std::pow(Scalar(10), internal::random(-3,3)); } CHECK_CWISE1_IF(internal::packet_traits::HasSin, std::sin, internal::psin); CHECK_CWISE1_IF(internal::packet_traits::HasCos, std::cos, internal::pcos); @@ -242,8 +242,8 @@ template void packetmath_real() for (int i=0; i(0,1e6); - data2[i] = internal::random(0,1e6); + data1[i] = internal::random(0,1) * std::pow(Scalar(10), internal::random(-6,6)); + data2[i] = internal::random(0,1) * std::pow(Scalar(10), internal::random(-6,6)); } if(internal::random(0,1)<0.1) data1[internal::random(0, PacketSize)] = 0;