futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | None
Language | GHC2021

Futhark.Util.CMath

Description

Bindings to the C math library.

Follows the naming scheme of the C functions when feasible.

Synopsis

- roundFloat :: Float -> Float
- ceilFloat :: Float -> Float
- floorFloat :: Float -> Float
- roundDouble :: Double -> Double
- ceilDouble :: Double -> Double
- floorDouble :: Double -> Double
- nextafterf :: Float -> Float -> Float
- nextafter :: Double -> Double -> Double
- lgamma :: Double -> Double
- lgammaf :: Float -> Float
- tgamma :: Double -> Double
- tgammaf :: Float -> Float
- erf :: Double -> Double
- erff :: Float -> Float
- erfc :: Double -> Double
- erfcf :: Float -> Float
- cbrt :: Double -> Double
- cbrtf :: Float -> Float
- hypot :: Double -> Double -> Double
- hypotf :: Float -> Float -> Float
- ldexp :: Double -> CInt -> Double
- ldexpf :: Float -> CInt -> Float
- copysign :: Double -> Double -> Double
- copysignf :: Float -> Float -> Float

# Documentation

roundFloat :: Float -> Float Source #

Round a single-precision floating point number correctly.

ceilFloat :: Float -> Float Source #

Round a single-precision floating point number upwards correctly.

floorFloat :: Float -> Float Source #

Round a single-precision floating point number downwards correctly.

roundDouble :: Double -> Double Source #

Round a double-precision floating point number correctly.

ceilDouble :: Double -> Double Source #

Round a double-precision floating point number upwards correctly.

floorDouble :: Double -> Double Source #

Round a double-precision floating point number downwards correctly.

nextafterf :: Float -> Float -> Float Source #

The next representable single-precision floating-point value in the given direction.

nextafter :: Double -> Double -> Double Source #

The next representable double-precision floating-point value in the given direction.

lgamma :: Double -> Double Source #

The system-level `lgamma()` function.

lgammaf :: Float -> Float Source #

The system-level `lgammaf()` function.

tgamma :: Double -> Double Source #

The system-level `tgamma()` function.

tgammaf :: Float -> Float Source #

The system-level `tgammaf()` function.

erf :: Double -> Double Source #

The system-level `erf()` function.

erff :: Float -> Float Source #

The system-level `erff()` function.

erfc :: Double -> Double Source #

The system-level `erfc()` function.

erfcf :: Float -> Float Source #

The system-level `erfcf()` function.

cbrt :: Double -> Double Source #

The system-level `cbrt` function.

cbrtf :: Float -> Float Source #

The system-level `cbrtf` function.

hypot :: Double -> Double -> Double Source #

The system-level `hypot` function.

hypotf :: Float -> Float -> Float Source #

The system-level `hypotf` function.

ldexp :: Double -> CInt -> Double Source #

The system-level `ldexp` function.

ldexpf :: Float -> CInt -> Float Source #

The system-level `ldexpf` function.

copysign :: Double -> Double -> Double Source #

The system-level `copysign` function.

copysignf :: Float -> Float -> Float Source #

The system-level `copysignf` function.