s++; if (s == send || isALPHA_FOLD_NE(*s, 'T')) return 0;
s++; if (s == send ||
/* allow either Infinity or Infinite */
- (isALPHA_FOLD_NE(*s, 'Y') &&
- isALPHA_FOLD_NE(*s, 'E')))
- return 0;
- s++;
+ !(isALPHA_FOLD_EQ(*s, 'Y') ||
+ isALPHA_FOLD_EQ(*s, 'E'))) return 0;
+ s++; if (s < send) return 0;
} else if (*s)
return 0;
flags |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
my @fmt = qw(e f g a d x c p);
-my $inf_tests = 11 + @fmt + 3 * @PInf + 3 * @NInf + 5;
+my $inf_tests = 11 + @fmt + 3 * @PInf + 3 * @NInf + 5 + 3;
my $nan_tests = 7 + @fmt + 2 * @NaN + 3;
my $infnan_tests = 4;
is(9**9**9, $PInf, "9**9**9 is Inf");
}
+{
+ # Silence "isn't numeric in addition", that's kind of the point.
+ local $^W = 0;
+ for my $i (qw(Info Infiniti Infinityz)) {
+ cmp_ok("$i" + 0, '==', 0, "false infinity $i");
+ }
+}
+
SKIP: {
if ($NaN == 1) {
skip $nan_tests, "no nan found";