Fast sine/cosine/tangent approximation using fourth degree polynomials
Project description
fasttrig
A fast and lightweight approximation of sin, cos, and tan using 4th-degree polynomials.
Unit: radian
Accuracy: Error < 0.001
Example
import numpy as np
from fasttrig import P1_fast, fast_cos, fast_tan
print(P1_fast(np.pi))
print(P1_fast([0, np.pi/2, np.pi]))
print(fast_cos([0, np.pi/2, np.pi]))
print(fast_tan(np.linspace(0, 2*np.pi, 100)))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fasttrig-0.1.4.tar.gz
(2.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fasttrig-0.1.4.tar.gz.
File metadata
- Download URL: fasttrig-0.1.4.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81f03ed0a818fecd973c82d56797716fd5140f214a4811b7d7276cb3022745fe
|
|
| MD5 |
3430833d2a63f56b9be63524c6e10336
|
|
| BLAKE2b-256 |
d1a3060f5096e9eb9efad5825662d00d227e3726e42eaaaab9c6cd9b85cda3a6
|
File details
Details for the file fasttrig-0.1.4-py3-none-any.whl.
File metadata
- Download URL: fasttrig-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e88a98291dd5723e567f9dd252a051879e4f296fbede0f9743b2afa65e5eb3e
|
|
| MD5 |
40f88df180134d1588bec59ddc697c85
|
|
| BLAKE2b-256 |
6b6257ca335aa5f9b7b42dd141396d4be17269a4c4abe5b90e153172f4252c66
|