significant-figures: Calculate expressions involving significant figures.

[ chemistry, gpl, library, math, program ] [ Propose Tags ]

This library provides a module Data.SigFig that helps with the parsing and evaluation of expressions involving significant figures. Significant figures are a method, often used in chemistry, of assessing and controlling the precision/uncertainty from measured values in calculations.

Expressions with significant figures are not easily calculable with a normal calculator, since they require intermediate rounding based on the rules governing significant figures. This library takes care of not only the intermediate rounding during evaluation, but also provides functions to parse text into expressions.

Parsing supports integer, float, and scientific notation (via E notation), constant terms (terms with effectively infinite significant figures), common operations, parentheses, and an additional small set of functions. Expressions can also be constructed via helper functions.

Evaluation takes care of rounding when dealing with expressions involving either/both of constant and measured terms. A few functions, however, such as log(), are unsupported on constant arguments, since with the current implementation it is impractical to store such a value that has theoretical infinite significant figures.

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2.0.0
Change log CHANGELOG.md
Dependencies base (>=4.14.3.0 && <5), HasBigDecimal (>=0.2.0.0 && <0.3), haskeline (>=0.8.1.3), parsec (>=3.1 && <4), significant-figures, terminfo (>=0.4.1.5), text (>=1.2 && <3) [details]
License GPL-3.0-or-later
Author Michael Lan
Maintainer michaellan202@gmail.com
Category Chemistry , Math
Bug tracker https://github.com/mizlan/significant-figures/issues
Uploaded by mizlan at 2022-09-06T00:31:46Z
Distributions NixOS:0.2.0.0
Executables significant-figures-cli
Downloads 140 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]