[More work on ch5 John Goerzen **20070612085351] { hunk ./en/book-shortcuts.xml 9 +Int16"> +Int32"> +Int64"> +Word"> +Word16"> +Word32"> +Word64"> hunk ./en/ch05-typeclasses.xml 436 - Fixed-precision integer; minimum range [-2^29..2^29-1] + Fixed-precision signed integer; minimum range [-2^29..2^29-1] + + + &Int16; + 16-bit signed integer + + + &Int32; + 32-bit signed integer + + + &Int64; + 64-bit signed integer hunk ./en/ch05-typeclasses.xml 452 - Arbitrary-precision integer; range limited only by + Arbitrary-precision signed integer; range limited only by hunk ./en/ch05-typeclasses.xml 460 + + &Word; + Fixed-precision unsigned integer; storage size same as + ∬ + + + &Word16; + 16-bit unsigned integer + + + &Word32; + 32-bit unsigned integer + + + &Word64; + 64-bit unsigned integer + + + + + + + These are quite a few different numeric types. There are some + operations, such as addition, that ought to work with all of them. + There are others, such as asin, that only apply to + floating-point types. + summarizes the different functions that operate on numeric types, + + + + FIXME: how to sort the operators? + + + Selected Numeric Functions + + + + + + + Function + Type + Description + + + + + (.&.) + Bits a => a -> a -> a + Bitwise and + + + (.|.) + Bits a => a -> a -> a + Bitwise or + + + shift + Bits a => a -> Int -> a + Shift left by the specified number of bits, + which may be negative for a right shift. + + + xor + Bits a => a -> a -> a + Bitwise exclusive or + hunk ./en/ch05-typeclasses.xml 534 + + }