From: Patrick Dugnolle Date: Thu, 19 Apr 2007 06:34:18 +0000 (-0700) Subject: [perl #42614] NAN_COMPARE_BROKEN.DIV_BY_NAN_BUG (with patch) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ebc6a117822d587e210a6c30233480f33d9c18d8;p=p5sagit%2Fp5-mst-13.2.git [perl #42614] NAN_COMPARE_BROKEN.DIV_BY_NAN_BUG (with patch) From: patrick.dugnolle@bnpparibas.com (via RT) Message-ID: p4raw-id: //depot/perl@30991 --- diff --git a/pp.c b/pp.c index f532c59..208a1a2 100644 --- a/pp.c +++ b/pp.c @@ -1306,7 +1306,11 @@ PP(pp_divide) #endif /* PERL_TRY_UV_DIVIDE */ { dPOPPOPnnrl; +#if defined(NAN_COMPARE_BROKEN) && defined(Perl_isnan) + if (! Perl_isnan(right) && right == 0.0) +#else if (right == 0.0) +#endif DIE(aTHX_ "Illegal division by zero"); PUSHn( left / right ); RETURN;