Import numbers

This tool lets you import your own numbers, allowing for more creative control over the output values. Simply copy numeric input to the clipboard from some other source, such as a Web site, and paste it into the textbox in Part A. You may also manually enter numbers by typing them into the textbox. Below are some links to Web sites that contain lists of numbers you might find interesting:

If you would like more information on earthquakes in the Pacific Northwest go to:

Numeric data from web sites is formatted in a variety of ways. Part B allows you to filter out unwanted data that is given in columns. For instance, if each line of data has three columns and you only want to extract data from the second one, click the checkbox and enter the number 2 in the textbox. As a result, only the second value found on each line will be imported. The checkbox is unchecked by default, meaning that all numbers will be imported, regardless of whether they are organized in columns. This option may be helpful for sorting DJIA historical data or seismic data from Mt. St. Helens.

If the numeric values use commas for placeholders, click the checkbox in Part C. For example, if the data contains the value 12,345 and you indicate that commas are used as placeholders, the value will be interpreted as 12345 (twelve thousand, three hundred forty-five). If the checkbox is unchecked, however, the value will be intrepreted as two numbers: 12, and 345.

In Part D, you are given the choice to interpret each number as a decimal floating-point value. If the box is unchecked, numbers are interpreted as integers, and all periods (.) are ignored in processing the input. For example, the following entered into the textbox:

12.3 .45 6. 07

would produce these output values:

12,3,45,6,07

All digits grouped together are considered a single number, and all other punctuation marks, spaces, letters, etc., are ignored. Note that the leading zero in the last value is kept, although it is still recognized as the number 7. If you do choose to interpret numbers as decimals, periods are not ignored. This is the default option, as the checkbox is initially checked. Here, you may select how many places to the right of the decimal point are significant (mentioned as the "precision"). Using the same example of input from above, you would receive the following in the "formatted input" textbox:

0 digits of precision:
  12
  0
  6
  7

1 digit of precision:
  12.3
  0.4
  6.0
  7.0

Only four numbers are found, since the digit 3 is interpreted as a decimal digit of 12. Also, .45 is interpreted as 0.45, the period following 6 is ignored because no digits follow, and leading zeroes are dropped, as with 07. Using 0 digits of precision essentially truncates all decimals (the .3 of 12.3 and the .45 of 0.45). Using 1 digit of precision does just that: it keeps only the first decimal place (if any) of a number, adding zeroes on the end if necessary (0.45 becomes 0.4, while 6. becomes 6.0). In general, if a number has more digits to the right of the decimal place than the selected precision, these extra digits are dropped; if it has fewer, it is padded with zeroes.

Since all algorithms featured on this site yield integer output values, and this tool is no exception, the values in the "formatted input" textbox are converted to integers when decimal interpretation is chosen and you click the Get algorithm output button. From the original input above, using 2 digits of precision, you would receive the following:

Formatted input:
  12.30
  0.45
  6.00
  7.00

Algorithm output values:
  1230,045,600,700

Decimal values are converted into integer values by simply removing the decimal point. Note that the second value is interpreted as 45, even though it has a leading zero. Removing the decimal point is used in the conversion because it yields integers that preserve the relative magnitudes of the original values.