what is 8.3000000000000004E-2

  • Thread starter Thread starter GaryDean
  • Start date Start date
G

GaryDean

I reading through an Excel xml file reading numbers and putting them into
columns in a grid. I come upon this file (that excel can read just fine)
where I encounter:

<Cell ss:StyleID="s28"><Data
ss:Type="Number">8.3000000000000004E-2</Data></Cell>

When I try to move that number into a decimal colume an exception is thrown
saying...

Input string was not in a correct format.Couldn't store
<8.3000000000000004E-2> in Labor Column. Expected type is Decimal.

After reading hundreds of such files this is the first one I have
encountered with the "E-2" ending.

Since Excel can read it, I'm thinking that it may somehow be valid and I
have to find a treatment for it.
 
yes, it's scientific notation for $0.083 or 8.3 cents. But the issue is why
is it causing an exception when moved to a decimal column.
 
re:
!> 8.3000000000000004E-2
!> yes, it's scientific notation for $0.083 or 8.3 cents.

Isn't it *floating point" notation, and not "scientific" notation ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
In scientific notation, numbers are written using powers of ten in the form a×10² power

Because exponents like 10³ power can't always be conveniently represented on
computers, typewriters, and calculators, an alternate notation is often used:
the "×10" is omitted and replaced by the letter E or e (short for exponent).

The exponent might be positive, or negative, as in the example in this tthread.

In this case, the exponent is not superscripted,
but is left on the same level with the significand (e.g. E-2 ).

When exponents are not superscripted, it's called "floating-point" notation.

That's a totally different notation than "scientific" notation,
even though they stand for the same numerical representations.

Please excuse the HTML, but it's the only way to render superscripts.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=========================================
 
It's not one or the other. It's a floating point number in scientific
notation.
 
re:
It's not one or the other. It's a floating point number in scientific notation.

<sigh>

I know.

The point is that there's several representations of scientific notation.
Floating point is one of them...and was the specific representation referred to.

You shouldn't refer to general cases with a specific name.

The are representations of scientific notation which aren't floating point,
so saying that a floating point number is "scientific notation" is inexact.

It's correct, mind you, but inexact, since there are representations
of scientific notation which aren't floating point representations.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Juan said:
re:

<sigh>

I know.

The point is that there's several representations of scientific notation.
Floating point is one of them...and was the specific representation referred to.

You shouldn't refer to general cases with a specific name.

The are representations of scientific notation which aren't floating point,
so saying that a floating point number is "scientific notation" is inexact.

It's correct, mind you, but inexact, since there are representations
of scientific notation which aren't floating point representations.

Why did you say that it was *not* scientific notation, then?
 
re:
Why did you say that it was *not* scientific notation, then?

I meant that it was not *just* scientific notation.

As explained, that's inexact.
Someone might get the idea that floating point is the only form of scientific notation.

You shouldn't refer to general cases with a specific name.

This OT thread has lasted long enough.
If you wish to make a final comment, to end the thread, be my guest.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Back
Top