I have my code doing some math and i have done it by hand, with wolfram, and excel excel didn't match any of the calcs therefore i gave up with that but my hand calcs were close to wolfram therefore im assuming discrepancies were due to rounding
all the numbers going in are the same as the numbers i use by hand and i have checked to make sure!!
The Wolfram page has the note: "Assuming trigonometric arguments in degrees".
Your code is doing the calculations using radians. All the trigonometric functions use radians for input or result values. If you want to treat the angles as degrees rather than radians, you need to convert them yourself.
Multiply the value in degrees by the conversion factor PI/180 to give the angle expressed in radians.