1N/A# my $class = ref($proto) || $proto; 1N/A# my $a = $accuracy; $a = $_[0] if defined $_[0]; 1N/A# my $p = $precision; $p = $_[1] if defined $_[1]; 1N/A# # Store the floating point value 1N/A# my $self = Math::BigFloat->new($value,$a,$p,$round_mode); 1N/A# bless $self, $class; 1N/A# $self->{'_custom'} = 1; # make sure this never goes away 1N/A #print "$a $accuracy $precision $round_mode\n"; 1N/A # calculate a BigFloat compatible string output 1N/A if ($x->{
sign} !~ /^[+-]$/)
# inf, NaN etc 1N/A my $s = $x->{
sign}; $s =~ s/^\+//;
# +inf => inf 1N/A my $s =
''; $s = $x->{
sign}
if $x->{
sign}
ne '+';
# +3 vs 3 1N/A# print " bstr \$x ", $accuracy || $x->{_a} || 'notset', " ", $precision || $x->{_p} || 'notset', "\n"; 1N/A # calculate a BigFloat compatible string output 1N/A if ($x->{
sign} !~ /^[+-]$/)
# inf, NaN etc 1N/A my $s = $x->{
sign}; $s =~ s/^\+//;
# +inf => inf 1N/A my $s =
''; $s = $x->{
sign}
if $x->{
sign}
ne '+';
# +3 vs 3