Comments (2)
This is already supported by the "read precision" (readprec) setting. This can be activated in qalc using set readprec
. The number of significant digits in output can be changed using the precision or max decimals settings.
> help readprec
read precision (readprec)
If activated, numbers are interpreted as approximate with precision equal to the number of significant digits
(3.20 = 3.20+/-0.005).
(0* = off, 1 = always, 2 = when decimals)
> set readprec
> 1.23*2.1
≈ 1.2300±0.0050 × 2.100±0.050 ≈ 2.583±0.062
Qalculate also supports specification of the precision/uncertainty/error of a value using ±
(or +/-
), or the interval()
and uncertainty()
functions.
By default the precision of the result (uncertainty propagation) is determined using the variance formula, but interval arithmetic can also be used (this is controlled by the "interval arithmetic", or ia
, setting). The common simple method of using the same number of significant digits in output as the number with the least number of significant digits in input is not supported.
With "read precision" enabled 1.23*2.1 will return 2.583±0.062 (or 2.583±0.072 with interval arithmetic enabled). Note that ± will by default be omitted for values with higher precision (e.g. 1.23 * 2.10 ≈ 2.6)
from libqalculate.
Apologies for adding a request without doing the proper research. The real implantation is better than what I requested.
from libqalculate.
Related Issues (20)
- [feature request] Variables as references to other variables + better multi-line support HOT 3
- Dsolve : Unable to solve diff(y) = -y HOT 1
- incorrect/inconsistent evaluation of some exponents HOT 2
- Support for library hidden visibility (path towards Clang CFI)
- Compilation fails since 755b86e HOT 1
- Make error when using Mingw64 on Windows 10 HOT 5
- Incorrect sum plot HOT 5
- Soversion should be bumped in 5.0.0 HOT 1
- Knuth's arrow notation? HOT 1
- Suggestion: support converting an exact fraction to factors HOT 1
- Is it possible to solve variable in "if" function HOT 3
- Conversion to AWG breaks without real assumption HOT 1
- difference between qalc man page and help message HOT 1
- Usage as calculator engine on physical calculator HOT 1
- Stack overflow while solving `x³-x²+sqrtx=0` with `set cplx off` HOT 2
- Alternative crypto exchange rates to coinbase
- Add planet(sun; mass) and other sun data HOT 8
- improve trigonometric functions output in exact mode
- raw stdin-based input mode for piping expressions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libqalculate.