[Haskell-beginners] How to use trigonometric functions with Data.Scientific?

Martin Vlk martin at vlkk.cz
Tue Jun 2 10:51:41 UTC 2015


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


More information about the Beginners mailing list