Measurements.jl
mpmath
Measurements.jl | mpmath | |
---|---|---|
2 | 10 | |
472 | 910 | |
1.1% | 0.9% | |
5.8 | 9.1 | |
24 days ago | 6 days ago | |
Julia | Python | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Measurements.jl
- Uncertainty in linear equations
-
Lisp-stat: An environment for Statistical Computing
Aside from the language features, some of the libraries in Julia make it really useful for statistical computing. One really cool library I am trying to use more and more in Julia is the Measurements library [1]. With the multiple dispatch system in Julia its super easy to integrate into most problems and can let you estimate error bounds on values programs produce. Super important for scientific applications.
I am hoping in the future that I can mix this in with some auto-diff problems to get uncertainty bounds on estimation problems with minimal fiddling with covariance matrices. Right now the performance is the only problem in integrating the library into pretty much any problem :(
[1] https://github.com/JuliaPhysics/Measurements.jl
mpmath
- mpmath – Python library for arbitrary-precision floating-point arithmetic
-
Lies My Calculator and Computer Told Me [pdf]
What you've done here is tell SymPy to use extra precision for the intermediate (and final) output. This doesn't truly fix the problem of cancellation and loss of precision, but for many practical purposes it can postpone the problem long enough to give you a useful result.
Internally, SymPy uses mpmath (https://mpmath.org/) for representation of numbers to arbitrary precision. You could install and use the latter library directly, gaining extra precision without going through symbolic manipulation.
All that being said, it's still good practice to avoid loss of precision at the outset. Arbitrary-precision calculations are slow compared to hardware-native floating point operations. Using the example from mpmath's homepage in iPython:
In [1]: import mpmath as mp; import scipy as sp; import numpy as np
-
mpmath VS gmpy - a user suggested alternative
2 projects | 2 Aug 2023
-
How can I compute the Mandelbrot Set at infinite zoom level
Either use a fixed point system with enough precision (determined beforehand) or consider a library like https://mpmath.org.
- How do I get more decimal places for numbers in Python?
-
My function isn't working correctly
Sure you can, check out projects for high precision numbers like https://mpmath.org/
- How to preserve decimal places
-
Math with Significant Figures
Probably the most popular package for dealing with error propagation and arbitrary precision arithmetic in Python is mpmath, more specifically the mp.iv module. For more serious applications I'd take a look at MPFR and Arb, both in C. And there are tons of ball arithmetic and interval arithmetic libraries in Fortran.
-
Integrating an extremely oscillating function!
Elaborating on /u/lanemik: if you're forced to do everything numerically and aren't able to use rationals, you can also use multiple-precision arithmetic. It's significantly slower, but it's as precise as you need it to be. Note that numpy will happily work with other objects that define arithmetic operations. I haven't messed with scipy enough to know how it does things.
- were can i find advance ( hardest ) python projects with source code ?
What are some alternatives?
ITensors.jl - A Julia library for efficient tensor computations and tensor network calculations
NumPy - The fundamental package for scientific computing with Python.
lisp-stat - Lisp-Stat main system
SigFigs - Implementation of a Sigfig class and an Exact class that allow math to be done while keeping the correct number of significant digits.
XLS-compat - XLISP-STAT compatibility library
gmpy - General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
FewSpecialFunctions.jl - Few special functions in Julia. Includes Clausen function, Coulomb wave functions, Debye function, Fresnel functions, Struve function, Hypergeometric functions, Confluent hypergeometric functions, Fermi-Dirac
arb - Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
common-lisp-stat - Common Lisp Statistics -- based on LispStat (Tierney) but updated for Common Lisp and incorporating lessons from R (http://www.r-project.org/). See the google group for lisp stat / common lisp statistics for a mailing list.
SciPy - SciPy library main repository
number-precision - 🚀1K tiny & fast lib for doing addition, subtraction, multiplication and division operations precisely
SymPy - A computer algebra system written in pure Python