{-# LANGUAGE MagicHash #-} module M where import Unsafe.Coerce import GHC.Exts foo :: Double -> Int foo (D# x) = I# (2# *# unsafeCoerce# (x +## 1.0##))