Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/billloic/amath


https://github.com/billloic/amath

floating-point math mathematics prime-numbers python

Last synced: about 9 hours ago
JSON representation

Awesome Lists containing this project

README

        

# Before you read



Feeling angry/upset? You can turn to *amath* for help.

# amath

This is a first python module with prime tools.

# Examples

```python
>>> import amath
>>> n = 100
>>> amath.prime_factor(n)
[2, 5, 2, 5]
>>> list(amath.prime_list(20))
[2, 3, 5, 7, 11, 13, 17, 19]
>>> amath.div(1, 6, n=100)
0.166666666666666666666666666666666666666666666666666666666666666666667
>>> amath.summation(start=0, end=10, expression="2*x")
110
>>> import numpy as np;zeros = np.zeros(25)
>>> import matplotlib.pyplot as plt
>>> prime = list(amath.prime_list(100))
>>> rg=list(range(25))
>>> plt.plot(rg, prime, rg, zeros)
[, ]
>>> plt.fill_between(rg, prime, zeros, alpha=0.25)

>>> plt.show()
```

# Library depend on......

Numpy

Sympy