in reply to Rounding to a Given Number of Significant Figures Rather Than Decimal Places
Thank you all very much for the advice.
After much playing about, I have found
the following to work
(including with negative numbers):<CODE>
$_ = FormatSigFigs($_,7);
$_ = sprintf("%8.8s", $_);
print $_,"\n";<CODE>
There will no doubt be numbers for which it doesn't work but it seems to be OK at the moment.