Taking logarithms

Generating random numbers

Binary representation of numbers

importData.Bits-- Extract a range of bits, most-significant firstbitRange::Bitsa=>a->Int->Int->[Bool]bitRangenlohi=reverse.map(testBitn)[lo..hi]-- Extract all bits, most-significant firstbits::Bitsa=>a->[Bool]bitsn=bitRangen0(bitSizen-1)-- Display a number in binary, including leading zeroes.-- c.f. Numeric.showHexshowBits::Bitsa=>a->ShowSshowBits=showString.map(\b->ifbthen'1'else'0').bits

Using complex numbers

Problem

Solution

Examples

creating a complex number from real and imaginary rectangular components