aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/packetmath.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp
index f355af491..ae7168fc8 100644
--- a/test/packetmath.cpp
+++ b/test/packetmath.cpp
@@ -551,7 +551,9 @@ void packetmath_real() {
if (PacketTraits::HasRound || PacketTraits::HasCeil || PacketTraits::HasFloor || PacketTraits::HasRint) {
typedef typename internal::make_integer<Scalar>::type IntType;
// Start with values that cannot fit inside an integer, work down to less than one.
- Scalar val = Scalar(2) * static_cast<Scalar>(NumTraits<IntType>::highest());
+ Scalar val = numext::mini(
+ Scalar(2) * static_cast<Scalar>(NumTraits<IntType>::highest()),
+ NumTraits<Scalar>::highest());
std::vector<Scalar> values;
while (val > Scalar(0.25)) {
// Cover both even and odd, positive and negative cases.