summaryrefslogtreecommitdiffstats
path: root/lib/Math/Decimal/FastPP.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Math/Decimal/FastPP.pm')
-rw-r--r--lib/Math/Decimal/FastPP.pm12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/Math/Decimal/FastPP.pm b/lib/Math/Decimal/FastPP.pm
index badca0f..cc516e1 100644
--- a/lib/Math/Decimal/FastPP.pm
+++ b/lib/Math/Decimal/FastPP.pm
@@ -114,9 +114,6 @@ sub dadd
my $bs = $bi . $bf;
my $cs = $as + $bs;
$cs = sprintf("%0${ce}i", $cs);
- # The substr() code is 400% faster than this regular expression code.
- #$cs =~ s/(.{$ce})$/.$1/;
- #return $cs;
return substr($cs, 0, length($cs) - $ce) . "." .
substr($cs, length($cs) - $ce);
}
@@ -142,9 +139,6 @@ sub dmul
my $cs = $as * $bs;
my $ce = $ae + $be;
$cs = sprintf("%0${ce}i", $cs);
- # The substr() code is 400% faster than this regular expression code.
- #$cs =~ s/(.{$ce})$/.$1/;
- #return $cs;
return substr($cs, 0, length($cs) - $ce) . "." .
substr($cs, length($cs) - $ce);
}
@@ -176,9 +170,6 @@ sub drhtz
--$as if $ad > "5" . "0" x (length($ad) - 1);
}
$as = sprintf("%0$_[1]i", $as);
- # The substr() code is 400% faster than this regular expression code.
- #$as =~ s/(.{$_[1]})$/.$1/;
- #return $cs;
return substr($as, 0, length($as) - $_[1]) . "." .
substr($as, length($as) - $_[1]);
}
@@ -210,9 +201,6 @@ sub drhfz
--$as if $ad >= "5" . "0" x (length($ad) - 1);
}
$as = sprintf("%0$_[1]i", $as);
- # The substr() code is 400% faster than this regular expression code.
- #$as =~ s/(.{$_[1]})$/.$1/;
- #return $as;
return substr($as, 0, length($as) - $_[1]) . "." .
substr($as, length($as) - $_[1]);
}