Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dariober
    Senior Member
    • May 2010
    • 311

    #1

    In Excel 1.0E-310 is >0.05!

    (This is just a curiosity, possibly a warning, only loosely related to bioinformatics)

    I accidentally found that according to Excel the number 1.0E-310 *is not* smaller than 0.05 (at least, on my Windows XP, 32 bit, Excel 2007).
    Try the following in Excel:
    Code:
    1.0E-305  "=A1<0.05"  Gives TRUE
    1.0E-310  "=A2<0.05"  Gives FALSE!
    1.0E-310  "=A3>0.05"  Gives TRUE!
    All the best

    Dario
  • ffinkernagel
    Senior Member
    • Oct 2009
    • 110

    #2
    which is not suprising since Excel stores floating point numbers of double which has a range of only around 1.7E308 (and I suspect excel stores your 1.0E-310 as a string... but that's excel for you).

    Unfortunately the pitfalls of floating point arithmetic is not commonly taught, even less so than the usual "don't use Excel if you can avoid it" guidance (there are a variety of other dangerous issues for example "Sep0-8" will become september 2008, open office calc will happily plot 1..n vs Y instead of X vs Y if there are Err: values in X instead of throwing an error, etc. that all lead to almost unnoticeable corruption)

    Comment

    • dariober
      Senior Member
      • May 2010
      • 311

      #3
      Originally posted by ffinkernagel View Post
      even less so than the usual "don't use Excel if you can avoid it" guidance
      I know I know...! I steer clear of Excel as much as possible. In a moment of laziness I got back to it and I got burned! Along with the text-to-date quirks one my favorites is '007' becoming '7'. I just found this one I posted particularly amusing.

      and I suspect excel stores your 1.0E-310 as a string
      I also suspected that but the funny thing is that the cell property for 1.0E-310 says 'number scientific'.

      Dario

      Comment

      • steven
        Senior Member
        • Aug 2009
        • 269

        #4
        ha ha, yes, i even remember a BMC Bioinformatics paper about that.

        Comment

        • pmiguel
          Senior Member
          • Aug 2008
          • 2328

          #5
          Originally posted by ffinkernagel View Post
          which is not suprising since Excel stores floating point numbers of double which has a range of only around 1.7E308 (and I suspect excel stores your 1.0E-310 as a string... but that's excel for you).
          If you type if "1.0E-400" excel lists the format as "scientific", but obviously leaves the string as text. (That is, it remains aligned against the left border of the cell, whereas numbers are aligned against the right border of the cell.)

          If you type "=1E-400" in a cell you get an error. If you type "=1E-300/1E+100", excel displays "0".

          (Excel 2007 on a 32 bit XP box.)

          So the actual behavior is a result of whatever parsing engine excel uses to perform the conversions of entered text to other formats. That and whatever dictum specifies that text is greater than numbers. But that is just DWIMery gone wrong.

          Code:
          perl -e 'print "X\n" if ("foo" < 100)'
          does print "X". Meaning "foo" is being evaluated somehow and is judged to be less than 100? If you add "use warnings;" perl will warn:

          Argument "foo" isn't numeric in numeric lt (<) at -e line 1.
          --
          Phillip

          Comment

          Latest Articles

          Collapse

          • SEQadmin2
            Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
            by SEQadmin2



            Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

            Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
            ...
            10-14-2026, 09:55 AM
          • SEQadmin2
            New Genomics Technologies Take Aim at Long-Standing Limits
            by SEQadmin2


            Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

            We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
            ...
            09-28-2026, 10:25 AM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by SEQadmin2, 10-22-2026, 11:13 AM
          0 responses
          35 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          25 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          41 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          45 views
          0 reactions
          Last Post SEQadmin2  
          Working...