473,320 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Convert Scientific (exponential) values to string

Hi all,

I have strings representing Scientific (exponential) values, for example
5.866000000000000e-002.
I need to convert them to double type. How ca this be done without analyzing
the string.

Thanks in advance,
Zion.

Nov 17 '05 #1
3 3610
something like:
double score;
if (!Double.TryParse(input[i], out score))

{

failOut("cannot parse alleged double" + input[i]);

return;

}

else doubles[i] = score;

"Zion Zadik" <zz****@012.net.il> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have strings representing Scientific (exponential) values, for example
5.866000000000000e-002.
I need to convert them to double type. How ca this be done without
analyzing the string.

Thanks in advance,
Zion.


Nov 17 '05 #2
something like:
double score;
if (!Double.TryParse(input[i], out score))

{

failOut("cannot parse alleged double" + input[i]);

return;

}

else doubles[i] = score;

"Zion Zadik" <zz****@012.net.il> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have strings representing Scientific (exponential) values, for example
5.866000000000000e-002.
I need to convert them to double type. How ca this be done without
analyzing the string.

Thanks in advance,
Zion.


Nov 17 '05 #3
something like:
double score;
if (!Double.TryParse(input[i], out score))

{

failOut("cannot parse alleged double" + input[i]);

return;

}

else doubles[i] = score;

"Zion Zadik" <zz****@012.net.il> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have strings representing Scientific (exponential) values, for example
5.866000000000000e-002.
I need to convert them to double type. How ca this be done without
analyzing the string.

Thanks in advance,
Zion.


Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Krish | last post by:
Hi, How to convert "1283912839E-5" string (in scientific format) to a decimal. Convert.ToDecimal("1283912839E-5") is throwing "Input string is not in correct format" exception. Is the...
1
by: Nick | last post by:
Well, the project I am working on has now come to a screeching halt! I have been developing a program that heavily utilizes ADO.NET record sets. To generate reports, I convert the recordset to XML,...
22
by: Michael Gorbach | last post by:
I was asked this summer to write a monte carlo code to simulation magnetic nanoparticles. For the nonphysicists, basicly it is a simulation where most of the time is taken up by looping through...
28
by: MLH | last post by:
The largest integer A97 can deal with is 2,147,483,647, as I understand it from HELP. I would be content to represent larger integers as strings. For example, "2147483648" would suit me fine. I...
6
by: Jay | last post by:
I need to convert from a string a double that is followed by a scaling character (k means *1e3, M=*1e6, etc) then apply the scaling character. Example: "-1.345k #comment" I know roughly how...
5
by: Kuldeep | last post by:
Hi All, Platform: Visual Studio 2005 Language: C#.NET Could you please help me find a pretty good component which can act as an Add-In to Visual Studio 2005 to carry out "Scientific...
2
by: Poz | last post by:
Is there a way to convert an exponential number (held in string format) to non-exponential format without losing any precision in the number? For example, I have a string variable containing...
3
by: swapna.munukoti | last post by:
Hi all, I am new to c#. I am facing a problem with exponential or scientific notification. When I use math.pow() funciton, if the numbers are big, it returns me in exponential format. And when...
1
by: pankajprakash | last post by:
Hi, I have a decimal number. I need to convert this decimal value to exponential value. I have a vb.net code to convert from decimal to exponential value is Format(100000, #.0#E-##) . When I run this...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.