desolver
mpmath
desolver | mpmath | |
---|---|---|
2 | 10 | |
17 | 914 | |
- | 1.3% | |
0.0 | 9.1 | |
over 2 years ago | 7 days ago | |
Python | Python | |
GNU General Public License v3.0 or later | 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.
desolver
-
Looking for some advice on how to solve this system of PDEs in Python. I discretised the spatial domain using the method of lines, leaving just a system of ODEs with time derivatives. I would like to solve these ODEs at all positions and times using an integrator like ODEint or solve_ivp
Oh yeah, it's downloadable from pypi too. Here's the link to the source code: https://github.com/microno95/desolver
-
A 1 Minute Double Pendulum Video For Your Viewing Pleasure (made using Python and DESolver)
Made using the DESolver python library I developed by adding algebraic equation solving to the implicit Runge-Kutta solvers. Works by taking a consistent set of differential and algebraic equations and solving them simultaneously at each timestep.
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?
fdtd - A 3D electromagnetic FDTD simulator written in Python with optional GPU support
NumPy - The fundamental package for scientific computing with Python.
ivy - The Unified Machine Learning Framework [Moved to: https://github.com/unifyai/ivy]
SigFigs - Implementation of a Sigfig class and an Exact class that allow math to be done while keeping the correct number of significant digits.
mars - Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
gmpy - General Multi-Precision arithmetic for Python 2.6+/3+ (GMP, MPIR, MPFR, MPC)
arb - Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
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
0.30000000000000004 - Floating Point Math Examples
Home Assistant - :house_with_garden: Open source home automation that puts local control and privacy first.