Skip to content

Commit

Permalink
Apply same fix to modff as modf
Browse files Browse the repository at this point in the history
  • Loading branch information
glguy committed Sep 28, 2015
1 parent 77a0633 commit 6f834a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Numeric/Extras.hs
Expand Up @@ -95,7 +95,11 @@ lift2F f a b = realToFrac (f (realToFrac a) (realToFrac b))
{-# INLINE lift2F #-}

c_modff :: CFloat -> (CFloat, CFloat)
c_modff a = unsafeDupablePerformIO $ alloca (\i -> (,) <$> c_modff_imp a i <*> peek i)
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
c_modff a = unsafeDupablePerformIO $ alloca $ \i -> (,) <$> c_modff_imp a i <*> peek i
#else
c_modff a = unsafePerformIO $ alloca $ \i -> (,) <$> c_modff_imp a i <*> peek i
#endif

foreign import ccall unsafe "math.h fmod"
c_fmod :: CDouble -> CDouble -> CDouble
Expand Down

0 comments on commit 6f834a1

Please sign in to comment.