What the difference between double and long data types

I assume they are both floating point numbers?, but would like to know the capacities of each.

Comments

  • Hey @scboyce - 

     

    Is this something you're working through in Workbench or as a DataFusion?

     

    These definitions are from the Help Center - Combining DataSets Using DataFusion

    • LONG stores numbers as numeric values, including decimal, fractional, and whole numbers.
    • DOUBLE stores double-precision floating point number values.
    • STRING stores alphanumeric characters as text.
    • DATETIME stores year, month, day, hour, minute, and second values.
    • DATE stores year, month, and day values.
    • TIME stores hour, minute, and second values.

     

    Beyond that, DOUBLE stores decimal values with a higher precision (24-53 digits) than a FLOAT type. LONG is used when a wider range than INT is needed. 

     

    Let me know if this helps!

  • kshah008
    kshah008 Contributor

    @scboyce, did PEAKS_valleys' reply help you out?

     

  • Hmm It seems my first reply did not actually make it to the forum.

     

    Somewhat.  I saw those descriptions in the help as well, but they are not very technical.

    For example, integers seem to want to be stored as LONGs, but that seems overkill, based just on the name.  But then again, since I can't find technical specifications on what a LONG actuall is, I don't know.

  • kshah008
    kshah008 Contributor

    @PEAKS_valleys, can you provide further insight? 

  • Hey @scboyce - 

     

    I'm assuming that the data types being used are because Domo is making sure to accommodate for different length numeric and string values (storage) and for efficiency reasons. For example, double floating point numbers have larger ranges than Decimal numbers and Double is the most efficient floating-point data type. Double variables can hold numbers as small as -4.94065645841246544E-324 for negative values and 4.94065645841246544E-324 for positive values

     

    Long variables accomodate interger numbers larger than Interger data types. Long variables can hold numbers from -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807. Operations with Long are slightly slower than with Integer but accomodate larger intergers. 

  • I can't for the life of me figure out why this is happening and preventing me from blending two nearly identical data sets.  I've tried adding decimal places to numbers and removing them and I can't figure this out.  The blend wont work until I get that Volume field to come in as a "Double."  Loosing mind...please help.

  • I think I fixed it and found the bug.  Changing the data after the file has been uploaded does not impact how the data is defined (as Long or as Double).  I took the exact same data set and reuploaded it after changing the value and it came in as a Double instead of Long when I added some decimals.

This discussion has been closed.