Copyright | (C) 2020 Claude Heiland-Allen |
---|---|
License | BSD3 |
Maintainer | Claude Heiland-Allen <claude@mathr.co.uk> |
Stability | experimental |
Portability | non-portable (needs C _Float128) |
Safe Haskell | None |
Language | Haskell2010 |
Numeric.Float128
Description
This module contains a Float128 type that can be used if you need the extra precision or range from the IEEE _Float128 quadruple precision type. It has 15bit signed exponent (compared to 11bit signed exponent for Double) and 113bit mantissa (compared to 53bit mantissa for Double).
Performance is likely to be poor, as the instances are implemented using FFI with Ptr Float128, copying to and from memory around each operation. If you need to bind to functions taking/returning _Float128 you need to write wrapper functions expecting pointers to _Float128 instead, as GHC does not expose a CFloat128 FFI type.
_Float128 data type
The _Float128 type.
Instances
RealFrac alternatives
truncate' :: Float128 -> Float128 Source #
Alternate versions of RealFrac methods that keep the value as a Float128.
round' :: Float128 -> Float128 Source #
Alternate versions of RealFrac methods that keep the value as a Float128.
ceiling' :: Float128 -> Float128 Source #
Alternate versions of RealFrac methods that keep the value as a Float128.
floor' :: Float128 -> Float128 Source #
Alternate versions of RealFrac methods that keep the value as a Float128.
Conversions
fromDouble :: Double -> Float128 Source #