HP Forums
Bug in article 893? (HP 35s Triangle solver) - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Bug in article 893? (HP 35s Triangle solver) (/thread-150846.html)



Bug in article 893? (HP 35s Triangle solver) - Dave Britten - 05-13-2009

In article 893, there's a rather nice triangle solver, though I think there's an error in the calculation of the 2nd SSA solution (menu option 6). Observe this bit of code:

T096	CF 10
T097 EQN ASIN(S/R*SIN(U))
T098 STO V
T099 EQN ACOS(-COS(U+V))
T100 STO W
T101 FS? 1
T102 GTO T084
T103 EQN ACOS(1)-W
T104 STO W
T105 GTO T084

I see two problems with this. First, ACOS(1) is always zero, so W (angle 3) is just negated, whereas it should be replaced with its supplement(ACOS(-1)-W).

The second problem is that it's actually angle 2 (V) that needs to be replaced with its supplement, not angle 3 (W).

I've made the following changes. Anybody care to confirm that this makes sense? It looks like I'm getting the correct results now.

T096	CF 10
T097 EQN ASIN(S/R*SIN(U))
T098 STO V
T099 FS? 1
T100 GTO T103
T101 EQN ACOS(-1)-V
T102 STO V

T103 EQN ACOS(-COS(U+V))
T104 STO W
T105 GTO T084

-Dave