10 Commits

Author SHA1 Message Date
Ayush Baranwal ffcaef924a Add fft()/invfft() functions for DFT calculation (#1152)
Addresses #707

Implements the Radix-2 Cooley-Tukey Fast Fourier Transform (FFT) algorithm to
compute the discrete fourier transform and inverse discrete fourier transform of a signal.

Inputs are currently restricted to lengths of powers of 2.
2026-08-21 04:23:58 +03:00
Sergey B Kirpichev fb69943530 Use explicit kwargs in public API, where possible
Following functions kept:
```pycon
>>> import inspect
... with_args = []
... with_kwargs = []
... for n in dir(mpmath):
...     m = getattr(mpmath, n)
...     try:
...         s = inspect.signature(m)
...     except:
...         continue
...     if any(_.kind == inspect._ParameterKind.VAR_POSITIONAL for _ in s.parameters.values()):
...         for name in s.parameters:
...             if s.parameters[name].kind == inspect._ParameterKind.VAR_POSITIONAL and name == 'args':
...                 with_args.append(n)
...                 break
...     if any(_.kind == inspect._ParameterKind.VAR_KEYWORD for _ in s.parameters.values()):
...         with_kwargs.append(n)
... print(with_args)
... print(with_kwargs)
...
['arange', 'ellipe', 'ellippi', 'linspace', 'matrix', 'ones', 'timing', 'zeros']
['multiplicity', 'timing']
```

We need support for multiple signatures in the first case.  In the
second - it's impossible to implement these functions without kwargs.

Closes #1056
2026-08-04 06:40:53 +03:00
Sergey B Kirpichev 6f1fbd275d Fix repr_dps() to produce a correct estimate
That should work at lest for 32-bit integers.  Though, I think that
the repr/str representation loses all sence for precisions much
less than that ;-)

Closes #1116
2026-07-01 05:36:13 +03:00
Ayush Baranwal a2e0351345 Add Brent root-finding algorithm (#1103)
Closes #1095
2026-06-19 03:31:16 +03:00
Ayush Baranwal 44ad9908cc Add ModAB rootfinding algorithm (#1093)
closes #1075
2026-06-07 04:30:24 +03:00
Sergey B Kirpichev 065746d7de Cleanup optimization.rst 2025-05-30 06:05:03 +03:00
Sergey B Kirpichev da36d96055 Reorganize imports in docs/ (no star imports) 2023-05-09 07:27:20 +03:00
GUI 9ce1a049cc Implementation of the Cohen algorithm for numerical inversion of the Laplace transform 2022-02-20 20:50:45 +01:00
Sergey B Kirpichev a5c95a8fbc Fix ~250 broken references in sphinx docs 2021-03-27 01:14:07 +03:00
Sergey B Kirpichev a9550c2b70 Reorganize docs (doc/source/ -> docs/, *.txt -> *.rst)
Structure now more closely follow https://packaging.python.org/

To build docs:

    python setup.py build_sphinx -c docs -b html,latex
    make -C build/sphinx/latex all-pdf
2021-03-27 01:14:07 +03:00