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…
One in five genetics papers contains errors thanks to Excel (2016)
141–150 of 267 posts
Re: One in five genetics papers contains errors thanks to Excel (2016)
#142An 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…
In the C language, -a*b parses as (-a)*b, but c-a*b parses as c-(a*b). Unary minus has a higher precedence than binary operators. You don't notice because the semantics allows the sign to move around, unlike with exponentiation. But when we throw in edge cases involved in undefined behavior, oops! 0 - INT_MIN/2 // fine: parses as 0 - (INT_MIN / 2) -INT_MIN/2 // not okay: parses as (-INT_MIN) / 2 The INT_MIN value nee…
For comparison, in Java, these 3 expressions each yield Integer.MIN_VALUE (i.e. -2147483648):
-Integer.MIN_VALUE
Integer.MIN_VALUE * -1
Integer.MIN_VALUE / -1
I have to admit I expected all 3 to throw.edit On reflection I shouldn't have expected that, I recall reading John Regehr's blog post on the downsides of how Java defaults to wrapping behaviour: https://blog.regehr.org/archives/1401
Re: One in five genetics papers contains errors thanks to Excel (2016)
#143Re: One in five genetics papers contains errors thanks to Excel (2016)
#144Re: One in five genetics papers contains errors thanks to Excel (2016)
#145An 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…
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…
Re: One in five genetics papers contains errors thanks to Excel (2016)
#146Earlier quoted context omitted.
The Godot game engine has its 2d graphics origin at the top-left of the screen, with the positive Y axis pointed down. Having clockwise trig functions is a natural consequence of that. I think it's a fairly common setup for all 2D graphics software.
I don't think I've ever seen a graphical system of any kind that didn't have 0,0 at the top-left corner of the monitor or viewport either, with positive x going right and positive y going down. I actually didn't even think about it until now. Now it's going to bug me. God damnit. :V
It's the only image format I've ever seen that does that -- everyone else stores lines in top-to-bottom order, consistent with putting (0,0) at the top-left.
Re: One in five genetics papers contains errors thanks to Excel (2016)
#147A HN thread similar to this one about how using Microsoft Excel corrupts data occurs about once a month. Nothing ever comes of it. Those emotionally invested in using Excel actively ignore criticism of it, or themselves for that matter.
Re: One in five genetics papers contains errors thanks to Excel (2016)
#148Re: One in five genetics papers contains errors thanks to Excel (2016)
#149Earlier quoted context omitted.
You're right that violating established mathematical convention can be a deal-killer for some kinds of adoption. A few years ago I was reading the docs for a new programming language, thinking it might be useful in teaching. The docs were well-written and in a beautifully produced book. I got to the chapter on trig functions and discovered that they'd decided to make angles increase clockwise . And there was a graph…
> I got to the chapter on trig functions and discovered that they'd decided to make angles increase clockwise . That is an established mathematical convention, called "bearing". https://en.wikipedia.org/wiki/Bearing_(navigation) > And there was a graph of the sine function, with the graph below the x-axis from 0 to 180 degrees. But that definitely isn't a convention anywhere; bearing 0 has sine 1. There isn't really…
Bearing is a nautical convention not a mathematical one.
I have worked on boat computer systems and can assure you that all the angles were in radians going in the proper direction while beatings were separate always shown in degrees and clockwise.