Forum Moderators: open
Is there a simple way of getting Engineering notation using JScript or CSS?
I know you can use number.toExponential(3) to show numbers in exponential format, but engineering is slightly different:
Number: 12345.67
Exp format: 1.234e+4
Eng format: 12.345e+3 (ie the exponent is divisible by 3)
Cheers, Neil
That's quite a first question!
I've checked a number of references and I can't uncover a JavaScript method that will do this. Seems like it ought to exist, since I believe e-notation is a standard floating point notation for JavaScript, but...
You might want to download and search one of these documents. What you need might just be tucked away in a corner somewhere.
ECMAscript documentation [ecma.ch]
Netscape's JavaScript documentation [developer.netscape.com]
Microsoft's Jscript documentation [msdn.microsoft.com]
Cheers, Neil