> --- sv.c.orig Wed Nov 22 23:58:27 2000 > +++ sv.c Sat Nov 25 22:34:57 2000 > @@ -2010,6 +2010,7 @@ > s++; if (*s != 'I' && *s != 'i') return 0; > s++; if (*s != 'T' && *s != 't') return 0; > s++; if (*s != 'Y' && *s != 'y') return 0; > + s++; > } > sawinf = 1; > } Oops. I think I tested only with 'Inf'... > Anyway, glibc seems to like NaN and infinity: As I said: that Perl passes 'nan' without complaining isn't a guarantee that the libc will. Before somebody suggests that Configure can test libc/atof on nan/inf, I say that no, it can't, easily at least. These corners of libc/libm/<math.h> are very nonstandardized: in other words, a horrible mess. > nick@Bagpuss [bleadperl]$ perl -wle 'print "nan" * 0' > Argument "nan" isn't numeric in multiplication (*) at -e line 1. > nan > nick@Bagpuss [bleadperl]$ perl -wle 'print "control" * 0' > Argument "control" isn't numeric in multiplication (*) at -e line 1. > 0 > > FreeBSD doesn't: > > bash-2.02$ perl -wle 'print "nan" * 0' > Argument "nan" isn't numeric in multiply at -e line 1. > 0 > bash-2.02$ ./perl -wle 'print "inf" + 1' > 1 > bash-2.02$ ./perl -wle 'print "infinity" + 1' > 1 > > > Nicholas Clark -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack CohenThread Previous | Thread Next