Advertisement
Guest User

Untitled

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