
3 Jun
2015
3 Jun
'15
9:23 a.m.
David McBride:
You should be able to use sin (toRealFloat a). But I imagine that could introduce some error into your calculations. You will have to make sure you put enough type signatures to infer Double.
Hi David, many thanks for your reply. In the end I found the problem was not in precision, but rather a much more mundane mistake - I failed to notice the trigonometric functions expect input value in radians, not degrees. Doh! :-) Now my calculation works as expected. Thanks again Martin