Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------------------------
- -- utility functions
- ----------------------------------------------------------------------------
- -- | Split number into (hi, lo).
- split :: Int -> Word64 -> (Word64, Word64)
- split w x = let half = w `shiftR` 1 -- fast division by 2
- in (x `shiftR` half, x .&. ((1 `shiftL` half) - 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement