rounded-hw-0.4.0.1: Directed rounding for built-in floating types
Safe HaskellSafe-Inferred
LanguageHaskell2010

Numeric.Rounded.Hardware.Vector.Storable

Synopsis

Conversion between VS.Vector a and VS.Vector (Rounded r a)

coercion :: Coercion (Vector a) (Vector (Rounded r a)) Source #

fromVectorOfRounded :: Vector (Rounded r a) -> Vector a Source #

toVectorOfRounded :: Vector a -> Vector (Rounded r a) Source #

coercionM :: Coercion (MVector s a) (MVector s (Rounded r a)) Source #

fromMVectorOfRounded :: MVector s (Rounded r a) -> MVector s a Source #

toMVectorOfRounded :: MVector s a -> MVector s (Rounded r a) Source #

Specialized functions

roundedSum :: RoundedRing_Vector vector a => RoundingMode -> vector a -> a Source #

Equivalent to \r -> foldl (roundedAdd r) 0

zipWith_roundedAdd :: RoundedRing_Vector vector a => RoundingMode -> vector a -> vector a -> vector a Source #

Equivalent to zipWith . roundedAdd

zipWith_roundedSub :: RoundedRing_Vector vector a => RoundingMode -> vector a -> vector a -> vector a Source #

Equivalent to zipWith . roundedSub

zipWith_roundedMul :: RoundedRing_Vector vector a => RoundingMode -> vector a -> vector a -> vector a Source #

Equivalent to zipWith . roundedMul

zipWith3_roundedFusedMultiplyAdd :: RoundedRing_Vector vector a => RoundingMode -> vector a -> vector a -> vector a -> vector a Source #

Equivalent to zipWith3 . roundedFusedMultiplyAdd

zipWith_roundedDiv :: RoundedFractional_Vector vector a => RoundingMode -> vector a -> vector a -> vector a Source #

Equivalent to zipWith . roundedDiv

map_roundedSqrt :: RoundedSqrt_Vector vector a => RoundingMode -> vector a -> vector a Source #

Equivalent to map . roundedSqrt

sum :: forall r a. (Rounding r, Storable a, RoundedRing_Vector Vector a) => Vector (Rounded r a) -> Rounded r a Source #

Equivalent to sum

zipWith_add :: forall r a. (Rounding r, Storable a, RoundedRing_Vector Vector a) => Vector (Rounded r a) -> Vector (Rounded r a) -> Vector (Rounded r a) Source #

Equivalent to zipWith (+)

zipWith_sub :: forall r a. (Rounding r, Storable a, RoundedRing_Vector Vector a) => Vector (Rounded r a) -> Vector (Rounded r a) -> Vector (Rounded r a) Source #

Equivalent to zipWith (-)

zipWith_mul :: forall r a. (Rounding r, Storable a, RoundedRing_Vector Vector a) => Vector (Rounded r a) -> Vector (Rounded r a) -> Vector (Rounded r a) Source #

Equivalent to zipWith (*)

zipWith3_fusedMultiplyAdd :: forall r a. (Rounding r, Storable a, RoundedRing_Vector Vector a) => Vector (Rounded r a) -> Vector (Rounded r a) -> Vector (Rounded r a) -> Vector (Rounded r a) Source #

Equivalent to zipWith3 fusedMultiplyAdd

zipWith_div :: forall r a. (Rounding r, Storable a, RoundedFractional_Vector Vector a) => Vector (Rounded r a) -> Vector (Rounded r a) -> Vector (Rounded r a) Source #

Equivalent to zipWith (/)

map_sqrt :: forall r a. (Rounding r, Storable a, RoundedSqrt_Vector Vector a) => Vector (Rounded r a) -> Vector (Rounded r a) Source #

Equivalent to map sqrt