Module

Data.Long.Unsigned

Package
purescript-longs
Repository
zapph/purescript-longs

#fromLowHighBits Source

fromLowHighBits :: Int -> Int -> Long

Creates a signed Long from low and high bits respresented as Int

#fromInt Source

fromInt :: Int -> Maybe Long

Creates a Long from an Int value

#fromString Source

fromString :: String -> Maybe Long

Reads an Long from a String value. The number must parse as an integer and fall within the valid range of values for the Long type, otherwise Nothing is returned.

#fromStringAs Source

fromStringAs :: Radix -> String -> Maybe Long

Like fromString, but the integer can be specified in a different base.

#lowBits Source

lowBits :: Long -> Int

Get low bits of a Long as an Int

#highBits Source

highBits :: Long -> Int

Get high bits of a Long as an Int

#toInt Source

toInt :: Long -> Maybe Int

Creates an Int if the Long value is within the range of Long.

#toString Source

toString :: Long -> String

Like show, but omits the ul suffix.

#toStringAs Source

toStringAs :: Radix -> Long -> String

Like toStringAs, but the integer can be specified in a different base.

#parity Source

parity :: Long -> Parity

Returns whether a Long is Even or Odd.

#even Source

even :: Long -> Boolean

Returns whether a Long is an even number.

#odd Source

odd :: Long -> Boolean

Returns whether a Long is an odd number.

#quot Source

quot :: Long -> Long -> Long

For unsigned longs, quot is identical to div.

#rem Source

rem :: Long -> Long -> Long

For unsigned longs, quot is identical to mod.

#toSigned Source

toSigned :: Long -> Long Signed

Converts to a signed long by reading the bits as a 2's complement 64 bit signed integer.