Bug: Subtractive Cancellation
- Ryan Hirst
Bug in my Angle2 method.
Drag point A. But what is the mistake? Let me walk through the problem. Red text indicates a demonstrable error. What are the conditions for displaying red? From left to right...
- ∡ θ: By construction, θ cannot go negative. The red channel of the text block: If[sgn(θ)≥0, 0, .5]
- tan θ: In the worksheet, the variable tanθ = sθ/cθ. Using a binary sign Hence we must have The red channel reads If[sgn(s_θ/c_θ) =σ1 σ2, 0, .5]
- Significant figures. ? This means nothing at the computer. It says "the error in elementary arithmetic operations can be unbounded". Now look below, in the cosine row. -4.4409E -16? Asked for more Significant Figures, GGB will happily fill them in. But the fact is, we are out of precision. These aren't trailing bits which are still good. The bits are junk. But don't take my word for it. Drag point A. What happens?