Live data from Hacker News

One in five genetics papers contains errors thanks to Excel (2016)

science.org

161–170 of 267 posts

Re: One in five genetics papers contains errors thanks to Excel (2016)

#161
Don't get me started on the automatic conversion of strings that it thinks are in scientific notation into numbers - which you can't switch off!

We have large data exports from systems that include things like unique location code. You accidentally happen to notice that a block of these look weird and it isn't just the display of them that has changed, the contents of the cell were changed by Excel automatically, without asking, and you cannot disable it.

Absolute BS after all these years. I hate that they won't fix these niggling issues that keep tripping people up over the years and just make excuses. Microsoft's usual response is: "We only work on things that affect a large number of customers". Yeah Microsoft, if you keep closing these bug reports, then each time someone reports it, you can just say that it only affects one person and close it again.

Or...you could show how amazing your company is by doing what most of us have to do: Fix it, add more debugging for the next time it happens if you can't recreate it, or have a properly tracked reason to say, "only a very few people have asked for this but changing it might break these other areas/bacwards compatability" or something.

Re: One in five genetics papers contains errors thanks to Excel (2016)

#162

An annoyance with spreadsheets that deterred me from ever using them in teaching is that they've perpetuated a arithmetic order-of-precedence bug. ("Bug" in the sense that it contradicts long-standing mathematical convention.) If you type -3^2 in a cell and press ENTER, the spreadsheet tell you it's "9". It should be "-9"; in math, exponentiation has precedence over unary minus, so you square 3, then negate the resul…

I had a discussion on one of the Nim boards because Nim does the same, i.e. Writing -2^2=4 but 0-2^2=-4 because Nim treats the first as the unary - which takes precedence over exponentiation. I realise that you can argue how it is technically correct (and interestingly several of the people I was talking with couldn't even get my point), but I still argue it's incredibly unintuitive for anyone coming from an regular…

There's no regular engineering convention about the ^ exponentiation operator, because there is no exponentiation operator in regular or engineering math notation. The superscript used for exponentiation doesn't need a precedence level, it has a natural grouping behvaior.

This is most visible in the fact that you never need parentheses around an exponent expression in math notation, but you need them a lot in programming notation. They are just different notations.

Consider in math notation:

   2+2
  3    + 5
Programming notation:

  3^(2+2)+5
Completely different notations in a much more fundamental way than how they treat unary minus.

Re: One in five genetics papers contains errors thanks to Excel (2016)

#163
post #122
post #103

Earlier quoted context omitted.

I recall reading that this was easier to implement in memory constrained machines running Excel back then, and now can't be changed for compatibility. It has bitten me when I computed the pdf of a standard normal in Excel, invoking exp(-A1^2), say. Someone made a website (in 2003, it's a bit out of date) tracking this issue: http://www.macnauchtan.com/pub/precedence.html

But of course it can be changed, you can make it configurable even if you decide the default should continue be this silly mistake "for compatibility"

There's no "mistake", the current way makes much more sense in programming notation. It's far better that -3^2 is consistent with -3+2. The caret notation for exponentiation is anyway completely different, and works very differently in terms of precedence from using super scripts in math.

Re: One in five genetics papers contains errors thanks to Excel (2016)

#164
post #55

Earlier quoted context omitted.

But it's 9! Check it: https://www.mathplanet.com/education/pre-algebra/explore-and... . "You also have to pay attention to the signs when you multiply and divide. There are two simple rules to remember: When you multiply a negative number by a positive number then the product is always negative. When you multiply two negative numbers or two positive numbers then the product is always positive." So basically you have…

No - in a subtle way, you're assuming that the unary minus has precedence, when the point is that it doesn't. You're right that "thing^2" means "thing times thing", but in "-3^2", what is it that is being squared? To write it, as you did, as "(-3) x (-3)", assumes that in "-3^2" the thing being squared is "-3". But that in turn assumes that the unary minus is done before the square. By the standard mathematical conve…

-3^2 is not a standard mathematical convention. -3² is, but that is completely different in many other ways.

Re: One in five genetics papers contains errors thanks to Excel (2016)

#165
post #58
post #55

Earlier quoted context omitted.

But it's 9! Check it: https://www.mathplanet.com/education/pre-algebra/explore-and... . "You also have to pay attention to the signs when you multiply and divide. There are two simple rules to remember: When you multiply a negative number by a positive number then the product is always negative. When you multiply two negative numbers or two positive numbers then the product is always positive." So basically you have…

https://www.wolframalpha.com/input?i=-3%5E2 https://en.wikipedia.org/wiki/Order_of_operations Parentheses, Exponentiation, Multiplication, Division, Addition, Subtraction -3^2 would then be correctly parsed as -(3^2) which is -9. Parsing it as (-3)^2 would require the addition of parentheses. This gets to the special case of the unary minus sign... which the Wikipedia article specifically calls out. Special cases Una…

Precedence is a property of notation and operators, not a property of operations. The ^ notation for exponentiation is fundamentally different from the common superscript notation, and so it is only natural that it has different precedence rule. The biggest difference is in how exponent expressions are handled, of course: in math notation, the entire expression is written in superscript and no parantheses are needed; in computer notation, you always need parantheses around the exponent expression.

Re: One in five genetics papers contains errors thanks to Excel (2016)

#166
post #122

Earlier quoted context omitted.

But of course it can be changed, you can make it configurable even if you decide the default should continue be this silly mistake "for compatibility"

There's no "mistake", the current way makes much more sense in programming notation. It's far better that -3^2 is consistent with -3+2. The caret notation for exponentiation is anyway completely different, and works very differently in terms of precedence from using super scripts in math.

That's a mistake in every statement: Excel isn't programming, so programming notation isn't even relevant

There is also no difference in the caret notation vs superscript, its upward pointing form literally meant to signify SUPERscript

It's far better that

0-3^2

-3^2

are consistent, consistency between exponent and addition makes little sense since by universal convention they have different priorities, so you'd not expect any "consistency" there Also your -3+2 example is meaningless since its output is the same as

-((+3)+2)

so there is no inconsistency with

-9

And no, ^ doesn't universally work differently vs superscript, just in some poorly designed apps

Re: One in five genetics papers contains errors thanks to Excel (2016)

#167

Earlier quoted context omitted.

This is probably the most overly pedantic, nitpicky reason for not using a program I've ever heard. I'm aware that there are two different conventions on this issue, so I just use parentheses to get the behavior I want. But, growing up, as the top math student in my class, it never occurred to me that somebody out there wants -3^2 to equal -9, I thought it was just a weird quirk in some calculators/programs. How woul…

I think we should agree that standard notation is too ambigious and switch to reverse polish notation: 3 2 ^ - -9 3 - 2 ^ 9 No way to misinterpret that!

Except 3 - 2 ^ makes it hard to express 3 2 - ^ without accidentally subtracting, so in this case a unary negation sign needs to be a different symbol!

Re: One in five genetics papers contains errors thanks to Excel (2016)

#168
post #166

Earlier quoted context omitted.

There's no "mistake", the current way makes much more sense in programming notation. It's far better that -3^2 is consistent with -3+2. The caret notation for exponentiation is anyway completely different, and works very differently in terms of precedence from using super scripts in math.

That's a mistake in every statement: Excel isn't programming, so programming notation isn't even relevant There is also no difference in the caret notation vs superscript, its upward pointing form literally meant to signify SUPERscript It's far better that 0-3^2 -3^2 are consistent, consistency between exponent and addition makes little sense since by universal convention they have different priorities, so you'd not…

I don't have a horse in this seemingly extremely important race, but Excel absolutely is programming

Re: One in five genetics papers contains errors thanks to Excel (2016)

#169
post #18

Earlier quoted context omitted.

Excel is not a genetics tool. It has millions if use cases, many more important than genetics. Excel didn’t care about this. It’s like people complaining because sugar gets misused. Or that murderers stab people with knives. The solutions isn’t to “fix” knives.

Excel is a tool for general-purpose data processing. What the genetics people are doing is exactly that.

General purpose means you’re trying to meet general purposes not every specialised purpose
Post reply on HN