Questions tagged [scientific-notation]

Scientific notation is a way of writing numbers. In scientific notation, all numbers are written in the form of a*10^b. In computing "E notation" is often used. It uses "E" or "e" letter instead of "*10^".

Scientific notation is a way of writing numbers that are too big or too small to be conveniently written in decimal form. Scientific notation has a number of useful properties and is commonly used in calculators and by scientists, mathematicians and engineers.

In scientific notation all numbers are written in the form of a*10^b, where a(mantissa) is a real number and b(exponent) is an integer.

There are different subtypes of this notation. E notation is often used in computing. It uses E or e letter instead of *10^. Note: in this usage the character e is not related to the mathematical constant e or the exponential function e^x

Some examples:

Standard deciaml | Normalized scientific | E (upper) | e (lower)
-----------------+-----------------------+-----------+----------
              30 |                3x10^1 |       3E1 |       3e1         
         1,538.1 |           1.5381x10^3 |  1.5381E3 |  1.5381e3         
     0.000 005 2 |           5.2x10^(-6) |    5.2E-6 |    5.2e-6         
            -0.2 |            -2x10^(-1) |     -2E-1 |     -2e-1         
683 questions
33
votes
3 answers

How can I convert numbers into scientific notation?

I want to make a function that takes an entered value and converts it to scientific notation (N x 10^a) I've tried many different things, but I can't seem to get it right. Example: I enter 200. The converter converts it to 2 x 10^2
tarcin
  • 577
  • 1
  • 5
  • 12
32
votes
4 answers

Format double value in scientific notation

I have a double number like 223.45654543434 and I need to show it like 0.223x10e+2. How can I do this in Java?
Daniel Gomez Rico
  • 15,026
  • 20
  • 92
  • 162
26
votes
7 answers

How to change the format of .describe() output?

I put .describe() to a Dataframe, the output doesn't look nice. I want the output to show the whole number and not be simplified with exponentials. Input: df["A"].describe() How the output looks like: count 6.000000e+01 mean …
Peckkee
  • 363
  • 1
  • 3
  • 6
24
votes
3 answers

Why does writing a number in scientific notation make a difference in this code?

I am trying to write a code to determine when the number of milliseconds since the beginning of 1970 will exceed the capacity of a long. The following code appears to do the job: public class Y2K { public static void main(String[] args) { …
sedeh
  • 7,083
  • 6
  • 48
  • 65
23
votes
3 answers

pandas to_csv: suppress scientific notation in csv file when writing pandas to csv

I am writing a pandas df to a csv. When I write it to a csv file, some of the elements in one of the columns are being incorrectly converted to scientific notation/numbers. For example, col_1 has strings such as '104D59' in it. The strings are…
ansonw
  • 1,559
  • 1
  • 16
  • 22
22
votes
2 answers

Is there a way to suppress scientific notation for ?

I'd like to input numbers with up to eight decimal points with an element. However, if I have an and use the up/down arrows on the input element (on Chrome; here's the jsfiddle), then I get scientific…
Claudiu
  • 224,032
  • 165
  • 485
  • 680
22
votes
1 answer

Avoid Scientific notation in cut function in R

How to avoid scientific notation present in the Intervals created by the cut function. a<-seq(10000,50000, by=500 ) cut(a, breaks = seq(0,max(a)+300, by = 300)) I have tried the below but it doesn't help. options("scipen"=100, "digits"=4)
Shoaibkhanz
  • 1,942
  • 3
  • 24
  • 41
20
votes
3 answers

Scientific Notation formatting in Python

How can get following formatting (input values are always less than 0.1): > formatting(0.09112346) 0.91123E-01 > formatting(0.00112346) 0.11234E-02 and so on. I am looking for some elegant solution. I am already using a custom function given…
ARK4579
  • 663
  • 2
  • 6
  • 16
19
votes
3 answers

Use fixed exponent in scientific notation

Consider the following Python snippet: for ix in [0.02, 0.2, 2, 20, 200, 2000]: iss = str(ix) + "e9" isf = float(iss) print(iss + "\t=> " + ("%04.03e" % isf) + " (" + str(isf) + ")") It generates the following output: 0.02e9 =>…
sdaau
  • 36,975
  • 46
  • 198
  • 278
18
votes
2 answers

Suppress Scientific Format in a Dataframe Column

I have a column called accountnumber with values similar to 4.11889000e+11 in a pandas dataframe. I want to suppress the scientific notation and convert the values to 4118890000. I have tried the following method and did not work. df =…
iprof0214
  • 701
  • 2
  • 6
  • 19
18
votes
2 answers

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.…
zslayton
  • 51,416
  • 9
  • 35
  • 50
18
votes
4 answers

What is E in floating point?

What is E+3? What exactly happens here? Can we use this approach in other data types or can we only use it in floating point numbers? static void Main(string[] args) { double w = 1.7E+3; Console.WriteLine(w); } Output: 1700
Masoud Darvishian
  • 3,754
  • 4
  • 33
  • 41
17
votes
2 answers

How do I get to haskell to output numbers NOT in scientific notation?

I have a some items that I want to partition in to a number of buckets, such that each bucket is some fraction larger than the last. items = 500 chunks = 5 increment = 0.20 {- find the proportions -} sizes = take chunks (iterate (+increment) 1) …
nont
  • 9,322
  • 7
  • 62
  • 82
17
votes
8 answers

Convert a string containing a number in scientific notation to a double in PHP

I need help converting a string that contains a number in scientific notation to a double. Example strings: "1.8281e-009" "2.3562e-007" "0.911348" I was thinking about just breaking the number into the number on the left and the exponent and than…
Bilal Shahid
  • 189
  • 1
  • 1
  • 10
17
votes
3 answers

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…
Escualo
  • 40,844
  • 23
  • 87
  • 135
1
2
3
45 46