DEV Community

Discussion on: Daily Challenge #163 - Significant Figures

Collapse
 
savagepixie profile image
SavagePixie

Yes, but I suppose it's changed to avoid the obvious string -> number -> string conversion that would take care of non-significant zeros.

Collapse
 
schwepmo profile image
schwepmo

Well actually, no. See my response :D

Thread Thread
 
idanarye profile image
Idan Arye

Still doesn't explain why "Trailing zeroes in a number without a decimal point" are not significant, considering how each such zero increases the number by an order of magnitude and how appending .0 suddenly makes these zeroes significant.

Thread Thread
 
schwepmo profile image
schwepmo

Check the Wikipedia article it explains that aswell. Short answer is, that trailing zeros are somewhat ambiguous and that you have to specify it by some rule, which is done by the task description.