Find the sines of an isosceles triangle when given its area and height.
For example, when A=60 and h=5, the result is [0.3752 0.3752 0.6927].
This problem has been polished and additional test cases were added.
I believe all of the test solutions of this problem are wrong
I believe that this problem is fixed now.
I think there might still be some issues with the test suite, Grant. Currently, only test suites 1 and 3 have sum(arcsind(y_correct))=180 within a degree. For test suite 3, you need to take 180-arcsind(y_correct(3)) to get the sum to equal 180, but the sines of those two angles are still the same.
Please let me know if I am missing something - If you take the arcsin for the current answers for problem 2 (y_correct = [0.7174 0.7174 0.8608]), you get angles in degrees of [49.84 49.84 59.41], which does not add up to 180 degrees. If you take 180-59.41 to keep the sine of angle #3 consistent, you end up with a sum greater than 180 degrees. Since this example is two 3-4-5 right triangles joined together at the 4-side (since height=4 and Area=12), I think the answer for case 2 should be [0.8 0.8 0.96].
Yes, the test solutions are incorrect. If the height of the triangle is h, and if the sides are s, then the sine of the angle at the base is h/s. The test solutions have all calculated this as sin(h/s).
@William, Great catch! Thanks a lot. :)
1822 Solvers
1540 Solvers
Implement a bubble sort technique and output the number of swaps required
78 Solvers
84 Solvers
Matrix multiplication across rows
106 Solvers