Numeric
Types
Fixed Integer
16-bit signed fixed point (1/65536 resolution).
32-bit signed fixed point (1/4294967296 resolution).
16-bit unsigned fixed point.
32-bit unsigned fixed point.
RoundNearest
Round to nearest, ties to even
RoundDown
Round toward negative infinity
RoundUp
Round toward positive infinity
RoundToZero
Round toward zero
IEEE 754 rounding modes.
FPInvalid
Invalid operation (e.g., sqrt(-1))
FPDivByZero
Division by zero
FPOverflow
Result too large
FPUnderflow
Result too small
FPInexact
Rounded result
Floating point exception flags.
Type Classes
Methods
quot :: a -> a -> a
rem :: a -> a -> a
div :: a -> a -> a
mod :: a -> a -> a
quotRem :: a -> a -> (a, a)
divMod :: a -> a -> (a, a)
toInteger :: a -> Integer
Integral numbers.
Methods
/ :: a -> a -> a
recip :: a -> a
fromRational :: Rational -> a
Fractional numbers.
Methods
pi :: a
exp :: a -> a
log :: a -> a
sqrt :: a -> a
** :: a -> a -> a
logBase :: a -> a -> a
sin :: a -> a
cos :: a -> a
tan :: a -> a
asin :: a -> a
acos :: a -> a
atan :: a -> a
sinh :: a -> a
cosh :: a -> a
tanh :: a -> a
asinh :: a -> a
acosh :: a -> a
atanh :: a -> a
Floating point numbers.
Methods
properFraction :: (Integral b) => a -> (b, a)
truncate :: (Integral b) => a -> b
round :: (Integral b) => a -> b
ceiling :: (Integral b) => a -> b
floor :: (Integral b) => a -> b
Real fractional numbers.
Methods
floatRadix :: a -> Integer
floatDigits :: a -> Int
floatRange :: a -> (Int, Int)
decodeFloat :: a -> (Integer, Int)
encodeFloat :: Integer -> Int -> a
exponent :: a -> Int
significand :: a -> a
scaleFloat :: Int -> a -> a
isNaN :: a -> Bool
isInfinite :: a -> Bool
isDenormalized :: a -> Bool
isNegativeZero :: a -> Bool
isIEEE :: a -> Bool
atan2 :: a -> a -> a
Real floating point numbers.
Primitive numeric types.
Unboxed types.
Methods
.&. :: a -> a -> a
.|. :: a -> a -> a
xor :: a -> a -> a
complement :: a -> a
shift :: a -> Int -> a
shiftL :: a -> Int -> a
shiftR :: a -> Int -> a
rotate :: a -> Int -> a
rotateL :: a -> Int -> a
rotateR :: a -> Int -> a
bit :: Int -> a
setBit :: a -> Int -> a
clearBit :: a -> Int -> a
complementBit :: a -> Int -> a
testBit :: a -> Int -> Bool
bitSize :: a -> Int
bitSizeMaybe :: a -> Maybe Int
isSigned :: a -> Bool
popCount :: a -> Int
Class for types with bit operations.
Methods
finiteBitSize :: a -> Int
countLeadingZeros :: a -> Int
countTrailingZeros :: a -> Int
Bits with finite size.
Functions
Get resolution of fixed-point type.
Create fixed-point from integer.
Convert fixed to integer (truncates).
Convert fixed to exact Rational.
Extract imaginary part.
Create from polar coordinates.
Unit complex from angle.
Convert to polar form (magnitude, phase).
Magnitude (absolute value).
Phase angle.
Complex conjugate.
Extract denominator.
Approximate rational.
Create 4-element Float vector.
Create 8-element Float vector.
vec16f32 :: Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Float -> Vec16F32
#
Create 16-element Float vector.
Create 2-element Double vector.
Create 4-element Double vector.
vec8f64 :: Double -> Double -> Double -> Double -> Double -> Double -> Double -> Double -> Vec8F64
#
Create 8-element Double vector.
Create 2-element Int32 vector.
Create 4-element Int32 vector.
Create 8-element Int32 vector.
vec16i32 :: Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Vec16I32
#
Create 16-element Int32 vector.
Create 2-element Int64 vector.
Create 4-element Int64 vector.
Create 8-element Int64 vector.
Broadcast scalar to all elements.
Create vector from list.
Convert vector to list.
Extract element at index.
Insert element at index.
Shuffle elements using mask.
Permute elements.
Vector addition.
Vector subtraction.
Vector multiplication.
Vector division.
Vector negation.
Vector absolute value.
Element-wise minimum.
Element-wise maximum.
Vector square root.
Reciprocal square root (approximate).
Reciprocal (approximate).
Fused multiply-add: a * b + c.
Fused multiply-subtract: a * b - c.
Vector equality comparison.
Vector inequality comparison.
Vector less-than comparison.
Vector less-equal comparison.
Vector greater-than comparison.
Vector greater-equal comparison.
Bitwise AND.
Bitwise OR.
Bitwise XOR.
Bitwise AND-NOT.
Select elements based on mask.
Sum all elements.
Product of all elements.
Minimum element.
Maximum element.
Horizontal add (adjacent pairs).
Horizontal subtract (adjacent pairs).
Load vector from memory.
Load from aligned memory.
Store vector to memory.
Store to aligned memory.
Masked load.
Masked store.
Gather from non-contiguous memory.
Scatter to non-contiguous memory.
Convert between integral types.
Convert between fractional types.
Positive infinity.
Negative infinity.
Not a number.
Smallest positive normal.
Largest finite value.
Machine epsilon.
Euler's number.
Greatest common divisor.
Least common multiple.
Subtraction (flip of -).
Test if even.
Test if odd.
Integer power.
Fractional power.
Sum of list.
Product of list.
Kahan compensated summation.
Pairwise summation.
Neumaier summation (improved Kahan).
Arithmetic mean.
Sample variance.
Standard deviation.
Sample covariance.
Pearson correlation coefficient.
Enumeration from start to end.
Enumeration with step.
Integer range.
Linear spacing.
Logarithmic spacing.
Geometric spacing.
Maximum value for bounded type.
Minimum value for bounded type.
Set current rounding mode.
Get current rounding mode.
Execute with specific rounding mode.
Get current FP exception flags.
Clear all FP exception flags.
Enable trapping for exception.
Disable trapping for exception.