mixed-types-num: Alternative Prelude with numeric and logic expressions typed bottom-up

[ bsd3, library, math ] [ Propose Tags ]
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2, 0.2.0.1, 0.3, 0.3.0.1, 0.3.1, 0.3.1.1, 0.3.1.2, 0.3.1.3, 0.3.1.4, 0.3.1.5, 0.3.2, 0.4.0, 0.4.0.1, 0.4.0.2, 0.4.1, 0.5.0.0, 0.5.0.1, 0.5.0.2, 0.5.0.3, 0.5.0.4, 0.5.1.0, 0.5.2.0, 0.5.3.0, 0.5.3.1, 0.5.4.0, 0.5.5.0, 0.5.6.0, 0.5.7.0, 0.5.8.0, 0.5.9.0, 0.5.9.1, 0.5.10, 0.5.11, 0.5.12 (info)
Change log changelog.md
Dependencies base (>=4.7 && <5), collect-errors (>=0.1 && <0.2), hspec (>=2.1), hspec-smallcheck (>=0.3), mtl, QuickCheck (>=2.7), smallcheck (>=1.1), template-haskell [details]
License BSD-3-Clause
Copyright 2015-2021 Michal Konecny
Author Michal Konecny
Maintainer mikkonecny@gmail.com
Category Math
Home page https://github.com/michalkonecny/mixed-types-num#readme
Bug tracker https://github.com/michalkonecny/mixed-types-num/issues
Source repo head: git clone https://github.com/michalkonecny/mixed-types-num
Uploaded by MichalKonecny at 2021-05-07T10:14:20Z
Distributions LTSHaskell:0.5.12, NixOS:0.5.12, Stackage:0.5.12
Reverse Dependencies 7 direct, 0 indirect [details]
Downloads 13718 total (102 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-05-07 [all 1 reports]

Readme for mixed-types-num-0.5.0.0

[back to package description]

mixed-types-num

This package provides a version of Prelude where unary and binary operations such as not, +, == have their result type derived from the parameter type(s) and thus supports mixed-type arithmetic and comparisons.

Partial operations such as division, sqrt and power do not throw exceptions even when errors such as division by zero occur. Instead, these errors are propagated bottom-up in a bespoke error-accumulating functor from package collect-errors.

This library (as well as collect-errors) arose while developing the AERN2 library for interval and exact real computation. Certain aspects are specifically tailored for interval or exact real arithmetics, including three-valued numerical comparisons and distinguishing potential and certain errors.

See module MixedTypesNumPrelude for further documentation.

Hackage page including Haddock