Skip Menu |

This queue is for tickets about the Math-Complex_C CPAN distribution.

Report information
The Basics
Id: 66735
Status: resolved
Priority: 0/
Queue: Math-Complex_C

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: sprout [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03
Fixed in: (no value)



CC: sprout [...] cpan.org
Subject: Bleadperl v5.13.5-290-gafa7457 breaks M:CC 0.03
As per subject. git bisect: commit afa74577a6e8d7cf96f7c62e4acca52fda973699 Author: Father Chrysostomos <sprout@cpan.org> Date: Mon Oct 4 13:58:49 2010 -0700 [perl #45133] -0.0 has variable Boolean value This patch makes -0.0 stringify as "0" (while leaving sprintf %g/%f unchanged). Example fail report http://www.cpantesters.org/cpan/report/30c834a2-4a1d-11e0-b643-fbcb9dcd942a I'm not CC'ing p5p, only sprout (hi!) because I'm sure you will have a consensus about the matter. HTH && Kind Regards,
RT-Send-CC: sprout [...] cpan.org
Show quoted text
fbcb9dcd942a Hi Andreas, sprout, I missed seeing this bug report, but when 5.14.0 hit the streets I soon discovered that something had changed wrt the sign of zero. As you say, 'printf "%f", -0.0' does indeed report a negative zero. Initially, I didn't realize this was the case - probably because I tested 'printf "%.0f", -0.0', which *doesn't* print the minus sign (on Windows, anyway). Therefore, Math-Complex_C-0.04 has ended up with an XSub (imaginatively named "is_neg_zero") so that anyone who cares about the sign of zero can check whether they do indeed have a '-0' or not. If the variable that's passed to that XSub is an NV && the NV slot contains a negative zero, then it returns 1. Else it returns 0. I think that does the right thing. I haven't raised this on p5p (or anywhere else, for that matter) ... perhaps I should have ... and perhaps I will. Thanks for taking the time to submit this bug report, and my apologies for not having seen it earlier. (I won't close it just yet, in case someone wants to add to the discussion.) Cheers, Rob
Closing this bug report. Cheers, Rob