Hoogle Search
Within LTS Haskell 24.31 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
safe-decimal Numeric.Decimal No documentation available.
-
safe-decimal Numeric.Decimal Divide two decimal numbers that have the same scale, while throwing PrecisionLoss whenever division cannot be done without rounding.
-
safe-decimal Numeric.Decimal Convert a Fixed to a decimal backed by a bounded integral with the exactly same precision
>>> fromFixedDecimalBounded (123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Int) Arith 123.458 >>> fromFixedDecimalBounded (123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Int8) ArithError arithmetic overflow >>> fromFixedDecimalBounded (-123.458 :: Fixed E3) :: Arith (Decimal RoundToZero 3 Word) ArithError arithmetic underflow
-
safe-decimal Numeric.Decimal No documentation available.
-
safe-decimal Numeric.Decimal Convert an Integer to a Decimal backed by a bounded integral while doing proper scaling and checking the bounds.
-
safe-decimal Numeric.Decimal Convert a bounded integeral into a decimal, while performing the necessary scaling
>>> import Numeric.Decimal >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int) 1234.0000 >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int16) *** Exception: arithmetic overflow
-
safe-decimal Numeric.Decimal No documentation available.
-
safe-decimal Numeric.Decimal Convert a Rational to a bounded Decimal, but only if there is no precision loss or Overflow/Undeflow.
-
safe-decimal Numeric.Decimal Convert from Scientific to bounded Decimal while checking for Overflow/Underflow
-
safe-decimal Numeric.Decimal Convert a decimal backed by an integral to another decimal backed by a bounded integeral, while checking for Overflow/Underflow
>>> import Numeric.Decimal >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int) 1234.0000 >>> fromIntegralDecimalBounded 1234 :: IO (Decimal RoundHalfUp 4 Int16) *** Exception: arithmetic overflow