Instead return to a well-defined hack that has served us for years.
Immediate reason: VMS. It has isfinite(), but due to messy
reasons it doesn't currently get the prototype.
: SvNV(argsv);
need = 0;
- /* frexp() has some unspecified behaviour for nan/inf,
- * so let's avoid calling that. */
- if (c != 'e' && c != 'E' && Perl_isfinite(nv)) {
+ /* frexp() (or frexpl) has some unspecified behaviour for
+ * nan/inf/-inf, so let's avoid calling that on those
+ * three values. nv * 0 will be NaN for NaN, +Inf and -Inf,
+ * and 0 for anything else. */
+ if (c != 'e' && c != 'E' && (nv * 0) == 0) {
i = PERL_INT_MIN;
(void)Perl_frexp(nv, &i);
if (i == PERL_INT_MIN)