jadenthem / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

Large numbers stored as exponents #243

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Enter in a large number (larger than 10^8)
2.  Attempt to break it apart using string manipulations (IE split)
3.  Observe as 4185920000 becomes 4.18592E9

What is the expected output? What do you see instead?
`I expected to be able to split the number into separate elements based on 
certain numbers of characters IE - splitByLength to pull out a dimension when 
the data entry person did not put spaces between them.

What version of the product are you using? On what operating system?
`2.0 on Windows XP

Please provide any additional information below.
`I have a large list of packaging elements and descriptions, I was able to pull 
the numbers out of the description, but when the data was entered, the person 
did not put spaces between dimensions of the boxes.

EXAMPLE:  500004575025875

I want to be able to split that to resolve it to 50" X 45.75" X 25.875"

Original issue reported on code.google.com by wisnef...@gmail.com on 20 Nov 2010 at 5:04

GoogleCodeExporter commented 8 years ago
You might try, Edit Cells --> Common Transforms --> To text
or
before you create your project, try un-checking "Auto-detect value types"
then try your splitByLength again.

Original comment by thadguidry on 20 Nov 2010 at 5:11

GoogleCodeExporter commented 8 years ago
Numbers are stored as Doubles (ie floating point numbers).  By default when 
they are converted to strings, if they are less than .001 or greater than or 
equal to 10^7, then it is represented in so-called "computerized scientific 
notation."

If you want to treat a string of digits as a string, you should make sure that 
they don't get turned into a number, by turning off auto-detect, as Thad 
suggested.  Once that conversion has been done, it's not necessarily reversable 
(particularly for large numbers or long strings of digits).

If someone needs to control floating point number formatting for some reason, 
please feel free to open an enhancement request with your use case, but for 
this particular case, I'm going to close this issue.

Original comment by tfmorris on 27 Nov 2010 at 2:18