I guarantee this is the mistake they made.
In some languages you can use Math.atan2(dy,dx) to easily avoid this.
I guarantee this is the mistake they made.
In some languages you can use Math.atan2(dy,dx) to easily avoid this.
I don't know of a language (but I don't know many) which trigonometric functions use degrees and not radians. In radians and finite precision, "cos(x) = 0" is false for all x (unless your cos is wrong), thanks to Pi being irrational (for example, cos(Pi_in_f64) is about 6.123233995736766E-17). You have "sin(0) = 0" though.
>angle = arctan(dy/dx) where dx=0.
If dy != 0, dy/0.0 is +-Infinity (if following IEEE754), so angle is +-Pi/2.
Coordinates/physics is among the things I see developers get wrong the most (even excluding units issues), along with threading/locks and instances_ownership/pooling.
Data races and deadlocks issues can be rare, and leaks get fixed by a restart, but these coordinates issues can introduce constant errors and biases often overlooked by tests (in addition to almost systematically unhandled cornercases like these).
Boeing engineers probably were skilled enough to account for zero division errors in their software, considering that the software works for eastward-pointing reciprocals. It's the sign function returning an unexpected value for zero and causing problems down the pipeline.
No. East-West runways are very common.
If I may speculate... the blanking of 5 displays is probably not a bug. Maybe it's a (misguided) feature meant to keep people from landing at certain restricted airports and they coded the logic incorrectly?
Just speculation on my part but clearing all displays seems like deliberate behavior being incorrectly triggered.
If it’s not in the manual, it’s a bug.
Unless the argument you’re making is “two bugs make a bug intended behaviour”
> Unless the argument you’re making is “two bugs make
> a bug intended behaviour”
When you start finding so many bugs, it's time to start closing Windows.It's normal to have error detection and the way to show it is to cross out (red lines, black background) the failed information on the screen. Not blank the whole thing.
The units are fairly independent in a modern system, communicating via data buses. So this sounds like a case where the bug made a unit emit something really bad on that bus to make them all go blank.