Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/billloic/amath
- Owner: BillLoic
- License: apache-2.0
- Created: 2022-09-10T04:43:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T14:35:08.000Z (5 months ago)
- Last Synced: 2024-06-22T22:29:52.533Z (5 months ago)
- Topics: floating-point, math, mathematics, prime-numbers, python
- Language: Python
- Homepage:
- Size: 217 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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......