in reply to significant digits in computations
It would be cool to have a perl library that would automatically apply the scientific "number of significant digits" rules.
would output 17300 0.000571 5500. Unfortunately I don't think any such beast exists.my $n1=new Number::Scientific(5500,3); #5500 w/ 3 significatn digits my $n2=new Number::Scientific(3.141592,7) # pi w/ 7 siginificant digit +s my $n3=$n1*$n2; my $n4=$n2/$n1; my $n5=$n1+$n2; print "$n3 $n4 $n5\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: significant digits in computations
by chromatic (Archbishop) on Jun 12, 2000 at 19:23 UTC | |
by lhoward (Vicar) on Jun 12, 2000 at 19:29 UTC |