I'm trying to write a function that counts the number of significant figures a given number has so I can ensure my calculations are rounded correctly; however, I am having a lot of trouble preventing the formatting engine from changing my inputs. For instance,Defer[00001.343200]
returns 1.3432
when I would like a way for the output to keep the raw input of a number as the original 00001.343200
or, failing that, 1.343200
. ToString
does the same thing. Phrased differently, I would like to suppress whatever is converting my input with leading and or trailing zeroes to an output that lacks leading and trailing zeroes.
Does anyone know how to do this, or find an equivalent solution?
NumberForm
or one of the related numeric formatting wrappers might have the capabilities you need. $\endgroup$ – Daniel Lichtblau Aug 27 '15 at 21:57"00001.343200"
? $\endgroup$ – IPoiler Aug 28 '15 at 0:31"
is pretty concise already is it not? $\endgroup$ – Mr.Wizard Aug 28 '15 at 3:17