diff --git a/icu4c/source/test/intltest/tsnmfmt.cpp b/icu4c/source/test/intltest/tsnmfmt.cpp index 5aef4e60070..b180b6901c5 100644 --- a/icu4c/source/test/intltest/tsnmfmt.cpp +++ b/icu4c/source/test/intltest/tsnmfmt.cpp @@ -197,7 +197,10 @@ IntlTestNumberFormat::testFormat(/* char* par */) // try again with very large numbers it = randDouble() * 10000000000.0; tryIt(it); - it = randDouble() * INT32_MAX; + + // try again with very large numbers + // and without going outside of the int32_t range + it = randFraction() * INT32_MAX; tryIt(it); tryIt((int32_t)uprv_floor(it));