Skip to main content
mullerpy logo

PyPI version

mullerpy

A Python implementation of Muller's method.


Usage

This library requires no dependencies beyond the Python standard library.

Here is a quick example to show how it is used:

from mullerpy import muller
from math import exp, sin

def f(x):
    return exp(-x) * sin(x)

xguesses = (-1, 0, 1)
res = muller(f, xguesses)

print(res.root)

This finds a root of the function

$$ f(x) = e^{-x} \sin(x), $$

which has roots at $x = n \pi$ for integer $n$. The result object has a .root attribute storing the estimated solution.

Installation

It is easy to install mullerpy with pip:

pip install mullerpy

Testing

To test, run

python -m unittest tests.test_muller

in the root directory. I like to use pytest, where you can simply enter

pytest

Metadata

Release files for mullerpy 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mullerpy 0.1.1
File Size Uploaded
mullerpy-0.1.1.tar.gz 838.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mullerpy 0.1.1
File Interpreter ABI Platform
mullerpy-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 843.8 kB

Release files / mullerpy-0.1.1.tar.gz

Download URL mullerpy-0.1.1.tar.gz
Size 838.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4b763b6f27d5c6b644ead47ef4e6d80b593ffb136d13bfdb08e74bd56796ae70
BLAKE2b-256 checksum
How to use checksums
efd8308e4509d64eaef53981e65a4abe1352c179f643852e3b29f4b86d8e334b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.8

Release files / mullerpy-0.1.1-py3-none-any.whl

Download URL mullerpy-0.1.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0834f46ac636b8a363229434233ce6c758d8a647b7402ad618f867de5df11a2
BLAKE2b-256 checksum
How to use checksums
26b8f0f359309f80e6b2f59da6b5921657cfcd8869f7c4690ed3ed2bce689c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.8

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page