decimal-arithmetic 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+21/−12 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- decimal-arithmetic.cabal +3/−3
- src/Numeric/Decimal.hs +18/−9
decimal-arithmetic.cabal view
@@ -1,6 +1,6 @@ name: decimal-arithmetic-version: 0.1.0.0+version: 0.1.0.1 synopsis: An implementation of Mike Cowlishaw's General Decimal Arithmetic Specification@@ -8,7 +8,7 @@ description: This package provides an implementation of the General Decimal Arithmetic Specification by Mike Cowlishaw. .- For details, see: http://speleotrove.com/decimal/+ For details, see <http://speleotrove.com/decimal/> homepage: https://github.com/verement/decimal-arithmetic#readme bug-reports: https://github.com/verement/decimal-arithmetic/issues@@ -20,7 +20,7 @@ author: Rob Leslie <rob@mars.org> maintainer: Rob Leslie <rob@mars.org> -stability: alpha+stability: experimental category: Numeric build-type: Simple
src/Numeric/Decimal.hs view
@@ -78,25 +78,34 @@ -- $usage ----- It is recommended that you create an alias for the type of numbers you wish--- to support in your application. For example:+-- It is recommended to create an alias for the type of numbers you wish to+-- support in your application. For example: -- -- > type Decimal = BasicDecimal -- -- This is a basic number type with 9 decimal digits of precision that rounds -- half up. ----- > type Decimal = ExtendedDecimal P19+-- > type Decimal = ExtendedDecimal P15 ----- This is a number type with 19 decimal digits of precision that rounds half--- even.+-- This is a number type with 15 decimal digits of precision that rounds half+-- even. There are a range of ready-made precisions available, including 'P1'+-- through 'P50' on up to 'P2000'. Alternatively, an arbitrary precision can+-- be constructed through type application of 'PPlus1' and/or 'PTimes2' to any+-- existing precision. -- -- > type Decimal = GeneralDecimal ----- This is a number type with infinite precision. (Note that not all--- operations support numbers with infinite precision.)+-- This is a number type with infinite precision. Note that not all operations+-- support numbers with infinite precision. ----- It is also possible to use a decimal number type in a @default@--- declaration, possibly replacing 'Double' or 'Integer'. For example:+-- > type Decimal = Number P34 RoundDown+--+-- This is a custom number type with 34 decimal digits of precision that+-- rounds down (truncates). Several 'Rounding' algorithms are available to+-- choose from.+--+-- A decimal number type may be used in a @default@ declaration, possibly+-- replacing 'Double' or 'Integer'. For example: -- -- > default (Integer, Decimal)