Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: How to use trigonometric functions with Data.Scientific?
(Martin Vlk)
----------------------------------------------------------------------
Message: 1
Date: Wed, 03 Jun 2015 13:23:45 +0000
From: Martin Vlk <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How to use trigonometric functions
with Data.Scientific?
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
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
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 84, Issue 5
****************************************