4 ms·
You joke, but I worked on a GPS app that would crash when crossing over the zero meridian. We didn't handle negative zero. The Degree/Minute/Second (DMS) near t
by linuxlizard 4y ago
You joke, but I worked on a GPS app that would crash when crossing over the zero meridian. We didn't handle negative zero. The Degree/Minute/Second (DMS) near the meridian will be +/- 0 when degrees is zero. Signed zero is a thing.
- perihelions 4y agoI'm not sure if I was joking. It'd be a free unit test for everyone. I remember there was a fighter jet that crashed (*software* crash) trying to cross the other meridian in the Pacific, https://www.engadget.com/2007-02-27-f-22-raptors-systems-crash-mid-flight-over-pacific.html https://www.engadget.com/2007-02-27-f-22-raptors-systems-cra...
- colechristensen 4y agoOh man I’ve actually written unit tests for aircraft navigation in these circumstances before.
- Rygian 4y agoOne would think they had that kind of stuff figured out much before: https://news.ycombinator.com/item?id=28969323 https://news.ycombinator.com/item?id=28969323
- yazan94 4y agoCan you elaborate some more please? This is blowing my mind right now, -0?
- BrandoElFollito 4y agohttps://en.wikipedia.org/wiki/Signed_zero https://en.wikipedia.org/wiki/Signed_zero for the CS version. This is common in maths when you approach a number 0 in this case) from either side. Your results may be dramatically different, such as "what happens when you approach 0 for f(x) = 1/x"