Project

plusminus

0.0
No commit activity in last 3 years
No release in over 3 years
A library that provides uncertainty and error propagation calculations for floats. It displays the appropriate number of digits when a number is outputted, can convert to latex using different formats.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.8.3
>= 0
~> 3.12
~> 2.8.0

Runtime

>= 0
 Project Readme

plusminus¶ ↑

This gem provides a way to calculate uncertainties of measurements.

5.129213.pm(0.01).to_s    #=> "5.13"

You can access the value and delta fields:

5.129213.pm(0.01).value   #=> 5.129213
5.129213.pm(0.01).delta   #=> 0.01

Error propagation is handled for operations

3.2.pm(0.1) + 4.5.pm(0.1)
# => 7.7.pm(0.2)
3.2.pm(0.1) * 4.5.pm(0.1)
# => 14.4.pm(0.77)

Contributing to plusminus¶ ↑

  • Fork

  • Branch

  • Commit

  • Pull request

Copyright © 2012 Bernát Kalló. See LICENSE.txt for further details.