[New tables in ch 5 John Goerzen **20070612093815] { hunk ./en/book-shortcuts.xml 19 +Integral"> + hunk ./en/ch05-typeclasses.xml 495 - Selected Numeric Functions + Selected Numeric Functions and Constants hunk ./en/ch05-typeclasses.xml 502 - Function + Item hunk ./en/ch05-typeclasses.xml 508 + + (+) + Num a => a -> a -> a + Addition + + + (-) + Num a => a -> a -> a + Subtraction + + + (*) + Num a => a -> a -> a + Multiplication + + + (/) + Fractional a => a -> a -> a + Fractional division + + + (**) + Floating a => a -> a -> a + Raise to the power of + + + (%) + Integral a => a -> a -> Ratio a + Ratio composition + + hunk ./en/ch05-typeclasses.xml 542 - Bitwise and + Bitwise and hunk ./en/ch05-typeclasses.xml 547 - Bitwise or + Bitwise or + + + abs + Num a => a -> a + Absolute value + + + approxRational + RealFrac a => a -> a -> + Rational + Approximate rational composition based on fractional numerators and + denominators + + + + cos + Floating a => a -> a + Cosine. Also provided are acos, + cosh, and acosh, with + the same type. + + + div + Integral a => a -> a -> a + Integer division always truncated down; see also + quot + + + fromInteger + Num a => Integer -> a + Conversion from an &Integer; to any numeric type + + + fromRational + Fractional a => Rational -> a + Conversional from a &Rational;. May be lossy. + + + log + Floating a => a -> a + Natural logarithm + + + logBase + Floating a => a -> a -> a + Log with explicit base + + + maxBound + Bounded a => a + The maximum value of a bounded + type + + + minBound + Bounded a => a + The minimum value of a bounded + type + + + mod + Integral a => a -> a -> a + Integer modulus + + + pi + Floating a => a + Mathematical constant pi + + + quot + Integral a => a -> a -> a + Integer division; fractional part of quotient + truncated towards zero + + + recip + Fractional a => a -> a + Reciprocal + + + rem + Integral a => a -> a -> a + Remainder of integer division + + + round + (RealFrac a, Integral b) => a -> b + Rounds to nearest integer hunk ./en/ch05-typeclasses.xml 641 - Shift left by the specified number of bits, - which may be negative for a right shift. + Shift left by the specified number of bits, + which may be negative for a right shift. + + + sin + Floating a => a -> a + Sine. Also provided are asin, + sinh, and asinh, with + the same type. + + + sqrt + Floating a => a -> a + Square root + + + + tan + Floating a => a -> a + Tangent. Also provided are atan, + tanh, and atanh, with + the same type. + + + toInteger + Integral a => a -> Integer + Convert any ∫ to an &Integer; + + + toRational + Real a => a -> Rational + Convert losslessly to &Rational; + + + truncate + (RealFrac a, Integral b) => a -> b + Truncates number towards zero hunk ./en/ch05-typeclasses.xml 682 - Bitwise exclusive or + Bitwise exclusive or hunk ./en/ch05-typeclasses.xml 692 + Bounded + Integral + Num + Real + Floating + Fractional + RealFrac + Ratio + + + Ord }