Math::BigFloat is not -w clean #166
Comments
From mjtg@cus.cam.ac.uk$x = Math::BigFloat->new(123); gives "undefined" warnings. Patch attached for 5.005_03, but should be OK for other versions. I note in passing that there are no regression tests for this module, Mike Guy And a message from our sponsors: perl perl perl perl perl perl perl Inline Patch--- ./lib/Math/BigFloat.pm.orig Thu Jan 7 04:41:53 1999
+++ ./lib/Math/BigFloat.pm Wed Jul 7 16:05:05 1999
@@ -76,8 +76,10 @@
sub fnorm { #(string) return fnum_str
local($_) = @_;
s/\s+//g; # strip white space
- if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/ && "$2$4" ne '') {
- &norm(($1 ? "$1$2$4" : "+$2$4"),(($4 ne '') ? $6-length($4) : $6));
+ if (/^([+-]?)(\d*)(\.(\d*))?([Ee]([+-]?\d+))?$/ &&
+ (length $2 || defined $4) {
+ my $x = defined $4 ? $4 : '';
+ &norm(($1||'+') . "$2$x", ($6||0)-length($x));
} else {
'NaN';
}
End of patch |
From [Unknown Contact. See original ticket]Original message from M.J.T. Guy (patch typo fixed as well). This is still Math::BigFloat is not -w clean. For example, $x = Math::BigFloat->new(123); gives "undefined" warnings. Patch attached for 5.005_03, but should be OK for other versions. I note in passing that there are no regression tests for this module, Mike Guy And a message from our sponsors: perl perl perl perl perl perl perl --- ./lib/Math/BigFloat.pm.orig Thu Jan 7 04:41:53 1999 End of patch |
Migrated from rt.perl.org#971 (status was 'resolved')
Searchable as RT971$
The text was updated successfully, but these errors were encountered: