For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > March 2007 > what is 8.3000000000000004E-2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author what is 8.3000000000000004E-2
GaryDean

2007-03-29, 7:09 pm

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.
--
Regards,
Gary Blakely


David Wier

2007-03-29, 7:09 pm

it's scientific notation -

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com


"GaryDean" <GaryDean@newsgroups.nospam> wrote in message
news:%23ADoT3hcHHA.3960@TK2MSFTNGP04.phx.gbl...
> 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.
> --
> Regards,
> Gary Blakely
>
>



GaryDean

2007-03-29, 7:09 pm

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.

--
Regards,
Gary Blakely
"David Wier" <david_wier@noSpamhotmail.com> wrote in message
news:ep4yH6hcHHA.2316@TK2MSFTNGP04.phx.gbl...
> it's scientific notation -
>
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://aspexpress.com
>
>
> "GaryDean" <GaryDean@newsgroups.nospam> wrote in message
> news:%23ADoT3hcHHA.3960@TK2MSFTNGP04.phx.gbl...
> thrown
>
>



Juan T. Llibre

2007-03-29, 7:09 pm

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/
===================================
"GaryDean" <GaryDean@newsgroups.nospam> wrote in message
news:upGsyJicHHA.4004@TK2MSFTNGP06.phx.gbl...
> 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.
>
> --
> Regards,
> Gary Blakely
> "David Wier" <david_wier@noSpamhotmail.com> wrote in message
> news:ep4yH6hcHHA.2316@TK2MSFTNGP04.phx.gbl...
>
>



David Wier

2007-03-29, 7:09 pm

It might be considered that too - but I've always heard of it under the
'umbrella' of scientific notation:
http://www.nyu.edu/pages/mathmol/textbook/scinot.html

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
news:%238DXKnicHHA.648@TK2MSFTNGP04.phx.gbl...
> 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/
> ===================================
> "GaryDean" <GaryDean@newsgroups.nospam> wrote in message
> news:upGsyJicHHA.4004@TK2MSFTNGP06.phx.gbl...
why is it causing an[color=darkred]
into[color=darkred]
fine)[color=darkred]
I[color=darkred]
>
>



Juan T. Llibre

2007-03-29, 7:09 pm

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/
========================================
=
"David Wier" <david_wier@noSpamhotmail.com> wrote in message
news:ufRqNfjcHHA.284@TK2MSFTNGP05.phx.gbl...
> It might be considered that too - but I've always heard of it under the
> 'umbrella' of scientific notation:
> http://www.nyu.edu/pages/mathmol/textbook/scinot.html


[color=darkred]
> "Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
> news:%238DXKnicHHA.648@TK2MSFTNGP04.phx.gbl...
[color=darkred]
[color=darkred]
[color=darkred]


Srini

2007-03-29, 7:09 pm

See if this helps
http://support.microsoft.com/kb/321542

"GaryDean" <GaryDean@newsgroups.nospam> wrote in message
news:upGsyJicHHA.4004@TK2MSFTNGP06.phx.gbl...
> 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.
>
> --
> Regards,
> Gary Blakely
> "David Wier" <david_wier@noSpamhotmail.com> wrote in message
> news:ep4yH6hcHHA.2316@TK2MSFTNGP04.phx.gbl...
>
>



GaryDean

2007-03-29, 10:05 pm

turns out the answer is: System.Single.

Good academic discussion though :)

--
Regards,
Gary Blakely
"David Wier" <david_wier@noSpamhotmail.com> wrote in message
news:ufRqNfjcHHA.284@TK2MSFTNGP05.phx.gbl...
> It might be considered that too - but I've always heard of it under the
> 'umbrella' of scientific notation:
> http://www.nyu.edu/pages/mathmol/textbook/scinot.html
>
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://aspexpress.com
>
> "Juan T. Llibre" <nomailreplies@nowhere.com> wrote in message
> news:%238DXKnicHHA.648@TK2MSFTNGP04.phx.gbl...
> why is it causing an
> into
> fine)
> I
>
>



Göran Andersson

2007-03-30, 4:14 am

It's not one or the other. It's a floating point number in scientific
notation.

Juan T. Llibre wrote:
> 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/
> ===================================
> "GaryDean" <GaryDean@newsgroups.nospam> wrote in message
> news:upGsyJicHHA.4004@TK2MSFTNGP06.phx.gbl...
>
>



--
Göran Andersson
_____
http://www.guffa.com
Juan T. Llibre

2007-03-30, 7:07 pm

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/
===================================
"Göran Andersson" <guffa@guffa.com> wrote in message news:%23WYr5gpcHHA.4004@TK2MSFTNGP06.phx.gbl...
> It's not one or the other. It's a floating point number in scientific notation.


> Juan T. Llibre wrote:
>
>
> --
> Göran Andersson
> _____
> http://www.guffa.com



Göran Andersson

2007-03-31, 7:05 pm

Juan T. Llibre wrote:
> 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?

--
Göran Andersson
_____
http://www.guffa.com
Juan T. Llibre

2007-03-31, 7:05 pm

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/
===================================
"Göran Andersson" <guffa@guffa.com> wrote in message news:%23gGK$n5cHHA.5044@TK2MSFTNGP05.phx.gbl...
> Juan T. Llibre wrote:
>
> Why did you say that it was *not* scientific notation, then?
>
> --
> Göran Andersson
> _____
> http://www.guffa.com



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com