Disable scientific notation in floating point numbers

38 views
Skip to first unread message

Pastafarianist

unread,
Feb 16, 2015, 3:30:22 PM2/16/15
to nume...@googlegroups.com
Hello everyone. Perhaps a newbie's question, but I couldn't find any answer.

As can be easily seen in the workshop, numeric.prettyPrint renders floating point numbers in the scientific notation. For example, 0.0000001 is rendered as 1e-7. While often useful, this makes it hard to compare directly several floating point numbers visually. Is there a simple way to disable such behavior?

Sébastien Loisel

unread,
Feb 16, 2015, 6:42:05 PM2/16/15
to nume...@googlegroups.com
There' snow way to change this but you can always do your own manual conversion to string.

Thanks,

S


On Monday, February 16, 2015, Pastafarianist <mr.pasta...@gmail.com> wrote:
Hello everyone. Perhaps a newbie's question, but I couldn't find any answer.

As can be easily seen in the workshop, numeric.prettyPrint renders floating point numbers in the scientific notation. For example, 0.0000001 is rendered as 1e-7. While often useful, this makes it hard to compare directly several floating point numbers visually. Is there a simple way to disable such behavior?

--
You received this message because you are subscribed to the Google Groups "numericjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numericjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Sébastien Loisel
Assistant Professor
Department of Mathematics, Heriot-Watt University
Riccarton, EH14 4AS, United Kingdom
web: http://www.ma.hw.ac.uk/~loisel/
email: S.Loisel at hw.ac.uk
phone: +44 131 451 3234
fax: +44 131 451 3249


Reply all
Reply to author
Forward
0 new messages