Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement missing Double primitives #18

Open
bamboo opened this issue Oct 1, 2016 · 0 comments
Open

Implement missing Double primitives #18

bamboo opened this issue Oct 1, 2016 · 0 comments

Comments

@bamboo
Copy link
Owner

bamboo commented Oct 1, 2016

exp : Double -> Double
exp x = prim__floatExp x

log : Double -> Double
log x = prim__floatLog x

sin : Double -> Double
sin x = prim__floatSin x

cos : Double -> Double
cos x = prim__floatCos x

tan : Double -> Double
tan x = prim__floatTan x

asin : Double -> Double
asin x = prim__floatASin x

acos : Double -> Double
acos x = prim__floatACos x

atan : Double -> Double
atan x = prim__floatATan x

atan2 : Double -> Double -> Double
atan2 y x = atan (y/x)

sinh : Double -> Double
sinh x = (exp x - exp (-x)) / 2

cosh : Double -> Double
cosh x = (exp x + exp (-x)) / 2

tanh : Double -> Double
tanh x = sinh x / cosh x

sqrt : Double -> Double
sqrt x = prim__floatSqrt x

floor : Double -> Double
floor x = prim__floatFloor x

ceiling : Double -> Double
ceiling x = prim__floatCeil x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant