From: Dominic Dunlop Date: Fri, 29 Jul 2005 17:41:59 +0000 (+0200) Subject: Re: Smoke [5.9.3] 25237 FAIL(F) linux 2.6.12-4-686 [debian] (i686/1 cpu) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8ed30cc1e47085c3ae66654e63971dec45c27ca8;p=p5sagit%2Fp5-mst-13.2.git Re: Smoke [5.9.3] 25237 FAIL(F) linux 2.6.12-4-686 [debian] (i686/1 cpu) Message-Id: <33378322-189C-4D70-AC0B-1AF589DD56E7@mac.com> p4raw-id: //depot/perl@25247 --- diff --git a/sv.h b/sv.h index 44e9cf2..6983f45 100644 --- a/sv.h +++ b/sv.h @@ -870,9 +870,11 @@ in gv.h: */ #define SvRVx(sv) SvRV(sv) #ifdef PERL_DEBUG_COW +/* Need -0.0 for SvNVX to preserve IEEE FP "negative zero" because + +0.0 + -0.0 => +0.0 but -0.0 + -0.0 => -0.0 */ # define SvIVX(sv) (0 + ((XPVIV*) SvANY(sv))->xiv_iv) # define SvUVX(sv) (0 + ((XPVUV*) SvANY(sv))->xuv_uv) -# define SvNVX(sv) (0 + ((XPVNV*) SvANY(sv))->xnv_nv) +# define SvNVX(sv) (-0.0 + ((XPVNV*) SvANY(sv))->xnv_nv) /* Don't test the core XS code yet. */ # if defined (PERL_CORE) && PERL_DEBUG_COW > 1 # define SvPVX(sv) (0 + (assert(!SvREADONLY(sv)), (sv)->sv_u.svu_pv))