The sides of a trapezoid are 5, 8, 11, and 13, and its diagonals are also integer numbers; what are they?
(In reply to
Solution, by hand by Old Original Oskar!)
My bug was in my implementation of the arccos function:
DEF fnac (x) = ATN(SQR(1  x * x) / x)
It returns a negative value (quadrant IV) rather than the correct second quadrant answer when x is negative, so when evaluating this solution it had the altitude as sqrt(315)/2 on one side and the negative of that on the other.
If they had been the correct (same) sign, even if slightly off due to rounding differences, the leeway afforded by the comparison would have found a match:
r = alt1 / alt2
IF ABS(r  1) < .00000001# THEN

Posted by Charlie
on 20050118 20:23:52 