Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Decimal to Scientific notationby Not_a_Number (Prior) |
on Mar 24, 2015 at 19:08 UTC ( [id://1121200]=note: print w/replies, xml ) | Need Help?? |
All the answers given so far are fine if there are 11* digits after the decimal point. But what if the mantissa is longer than 11 digits?:
Still truncated... And what if there are considerably fewer digits:
Would the OP want all those extra zeroes? One solution (admittedly not very elegant):
* Well, or 12 in this case.
In Section
Seekers of Perl Wisdom
|
|