in reply to Re^2: Calculating base difference of numbers
in thread Calculating base difference of numbers
Or if you want to round it,my $diff = ($new*10000) - ($old*10000);
my $diff = 0 + sprintf '%.0f', ($new*10000) - ($old*10000);
Update: The *10000 can be factored out: ($new-$old)*10000
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Calculating base difference of numbers
by Anonymous Monk on May 31, 2008 at 23:44 UTC | |
by ikegami (Patriarch) on Jun 01, 2008 at 03:01 UTC | |
by dragonchild (Archbishop) on Jun 01, 2008 at 00:16 UTC |