wide-word-0.1.8.1: Data types for large but fixed width signed and unsigned integers

Maintainer | erikd@mega-nerd.com
Stability | experimental
Portability | non-portable (GHC extensions and primops)
Safe Haskell | None
Language | Haskell2010

Data.WideWord.Word64

Description

This module provides an opaque unsigned 64 bit value with the usual set of typeclass instances one would expect for a fixed width unsigned integer type. Operations like addition, subtraction and multiplication etc provide a "modulo 2^64" result as one would expect from a fixed width unsigned word.

This just re-exports the Word64 type defined in Data.Word plus some functions like plusCarrySum and timesCarryProd that do the normal addition and multiplication but provide a carry in addition to the regular operation.

# Documentation

mkWord64 :: Word32 -> Word32 -> Word64 Source #

oneWord64 :: Word64 Source #

plusCarrySum :: Word64 -> Word64 -> (Word64, Word64) Source #

quotRem2Word64 :: Word64 -> Word64 -> Word64 -> (Word64, Word64) Source #

showHexWord64 :: Word64 -> String Source #

subCarryDiff :: Word64 -> Word64 -> (Word64, Word64) Source #

timesCarryProd :: Word64 -> Word64 -> (Word64, Word64) Source #

word64Hi32 :: Word64 -> Word32 Source #

word64Lo32 :: Word64 -> Word32 Source #

zeroWord64 :: Word64 Source #