Solved

# conversion of Exponentials to Fractional Values using Javascript

Posted on 2005-05-13
650 Views
How to convert exponential to Fraction Values.

The floating point values are shown in Exponentioal Form.

For Ex :
1 E-4  should be shown in Webpage as .0001

0
Question by:ramsharma23

LVL 32

Accepted Solution

Try to use toFixed()

example:

<script type="text/javascript">
var variable = 1.00343500000000;
document.write(variable.toFixed(4));
</script>
0

LVL 8

Assisted Solution

In my tests I did get the conversion down to 1E-6 without toFixed() conversion.
And if you need to read in the number, then use parseFloat().
Like this:
<script>
</script>

0

LVL 17

Expert Comment

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
Split between Batalf and NETTY4

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

cem_turk
EE Cleanup Volunteer
0

## Write Comment

Please enter a first name

Please enter a last name

We will never share this with anyone.

## Featured Post

### Suggested Solutions

A common challenge, or question, when working with two calendar dates is: What is the difference between the specified days? As is frequently the case, the answer is: It depends... What kind of difference do you want? Given two date obje…
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

#### 737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

#### Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!