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.

On Tue, Jun 2, 2015 at 6:51 AM, Martin Vlk <martin@vlkk.cz> wrote:
Hi, I am writing a program to do some astronomical calculation, and I am
using the Data.Scientific library to represent my floating point
numbers. Would anyone know how to use trigonometric functions with the
Scientific type?

I see:
a :: Scientific
a = scientific 500036 (-5)

sin :: Floating a => a -> a

-- this won't work
wrongType = sin a

Any ideas?

Many Thanks
Martin
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners