scientific-notation

Convert from scientific notation string to float in C#

What's the proper way to convert from a scientific notation string such as "1.234567E-06" to a floating point variable using C#? ...

In Access 2007 CSV Export: Disable Scientific Notation.

When exporting a CSV from Access 2007, it automatically converts decimals into scientific notation. Unfortunately the tool that receives them treats these fields as text, and displays them as is. The values being exported are from a query being run against some Excel linked tables, and they appear perfectly in the query view. Is there...

Parsing scientific notation sensibly?

I want to be able to write a function which receives a number in scientific notation as a string and splits out of it the coefficient and the exponent as separate items. I could just use a regular expression, but the incoming number may not be normalised and I'd prefer to be able to normalise and then break the parts out. A colleague ha...

Why use 'e0' at the end of a defined constant in c?

Hi Everyone, I'm trying to debug a problem with a perl application that calls some c programs to do text editing. BATCH_JV_CSH_MAX is used to test the maximum value of an amount field. It currently indicates an error if the amount is over 99,999,999.99. Is is supposed to accept values up to 999,999,999.99. Well, that is what is stat...

Why in SAS does a numeric literal in scientific notation give a different number to the number written out explicitly?

The following SAS code: data _null_; format t u best32.; t = 10000000000000000000000000; u = 1e25; put t u; if t ne u then put 'diff'; run; on my Windows machine prints out: 10000000000000000905969664 9999999999999998758486016 diff While I understand that only the first 15-16 digits are to be trusted, why do they give dif...

How can I print a huge number in Lua without using scientific notation?

I'm dealing with timestamps in Lua showing the number of microseconds since the Epoch (e.g. "1247687475123456"). I would really like to be able to print that number in all its terrible glory, but Lua insists on printing it in scientific notation. I've scoured the available documentation about printing a formatted string, but the only av...

Java DecimalFormat Scientific Notation Question

Hello. I'm using Java's DecimalFormat class to print out numbers in Scientific Notation. However, there is one problem that I have. I need the strings to be of fixed length regardless of the value, and the sign on the power of ten is throwing it off. Currently, this is what my format looks like: DecimalFormat format = new DecimalFor...

Only 2 digits in exponent in scientific ofstream

So according to cplusplus.com when you set the format flag of an output stream to scientific notation via of.setf(ios::scientific) you should see 3 digits plus and a sign in the exponent. However, I only seem to get 2 in my output. Any ideas? Compiled on Mac OS using GCC 4.0.1. Here's the actual code I am using: of.setf(ios::sci...

String in scientific notation C++ to double conversion

Hi, I've got a database filled up with doubles like the following one: 1.60000000000000000000000000000000000e+01 Does anybody know how to convert a number like that to a double in C++? Is there a "standard" way to do this type of things? Or do I have to roll my own function? Right now I'm doing sth like this: #include <string> #in...

Python scientific notation using D instead of E

Some results file produced by Fortran programs report double precision numbers (in scientific notation) using the letter D instead of E, for instance: 1.2345D+02 # instead of 1.2345E+02 I need to process huge amounts of this data using Python, and I just realized it cannot read the numbers in the D notation, for instance: >>> A = 1.0...

AutoCompleteExtender shows long numeric values in scientific notation

Hi everyone! I'm having an issue with ajaxToolkit:AutoCompleteExtender in ASP.NET. When an item is numeric and longer than 17 digits, it's shown in scientific notation. Does anyone know how to solve this? I googled it for a while and couldn't find anything. Thanks! ...

Formatting Output

Hello fellow www-people! I need to output numbers in scientific notation such that there is always a "0" before the decimal point. e.g. For the number x = 134.87546, I need to produce the output 0.134875E03 NOT 1.348755E02 Does someone know how to do this? Thanks in Advance --Shiraz. ...

Prevent scientific notation in ostream when using << with double

I need to prevent my double to print in scientific notation in my file, when I do this outfile<<X; ...

Convert scientific notation to decimal notation

There is a similar question on SO which suggests using NumberFormat which is what I have done. I am using the parse() method of NumberFormat. public static void main(String[] args) throws ParseException{ DecToTime dtt = new DecToTime(); dtt.decToTime("1.930000000000E+02"); } public void decToTime(String angle) throws ParseE...

How can I convert between scientific and decimal notation in Perl?

I know this is a total newbie question, but the answer may not be obvious to many new programmers. It wasn't initially obvious to me so I scoured the Internet looking for Perl modules to do this simple task. ...

Reading ASCII numbers using "D" instead of "E" for scientific notation using C

Hello, I have a list of numbers which looks like this: 1.234D+1 or 1.234D-02. I want to read the file using C. The function atof will merely ignore the D and translate only the mantissa. The function fscanf will not accept the format '%10.6e' because it expects an E instead of a D in the exponent. When I ran into this problem in Pytho...

Greek/latin scientific JLabel in Java Swing application

For a scientific application I want to design an input form which lets the user enter certain parameters. Some of them are designated using greek letters, some of them have latin letters. The parameter names should be displayed using ordinary JLabel controls. On Windows, the Tahoma font (which is used for Labels by default) contains bot...

Are there any good descriptions of scientific notation formatting using printf

Please no general printf descriptions. ...

Format double value in scientific notation

I have a double number like 223.45654543434 and I need to show it like "0.223x10E-3". How can I do this in Java? ...