Metadata-Version: 2.4
Name: mullerpy
Version: 0.1.0
Summary: A Python implementation of Muller's method.
Project-URL: source, https://github.com/fgittins/mullerpy
Author-email: Fabian Gittins <f.w.r.gittins@uu.nl>
License: MIT License
        
        Copyright (c) 2023 Fabian Gittins
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE.md
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# 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:

```python
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

You can install `mullerpy` in one of the following ways:

### From source (locally)

Clone the repository and install using `pip`:

```
git clone https://github.com/fgittins/mullerpy.git
cd mullerpy
pip install .
```

### Directly from GitHub

Or you can install directly from GitHub:

```
pip install git+https://github.com/fgittins/mullerpy.git
```

## 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
```
