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.5.tar.gz
(2.1 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.5.tar.gz.
File metadata
- Download URL: fasttrig-0.1.5.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ef69447e2331efc2d0f3602b9101eebadd48ad25b475388ab9235cf1ac13921
|
|
| MD5 |
198ebc8c79ec84b1b72b9c954efc0a6b
|
|
| BLAKE2b-256 |
d36e6e07ec2c308767e45fb78ad3c1d2a75df724a2068287366fa17f9318470e
|
File details
Details for the file fasttrig-0.1.5-py3-none-any.whl.
File metadata
- Download URL: fasttrig-0.1.5-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 |
8fb8f4b204b53a590d432e08367711d1d754babefe353ccc3f393f60a1791b18
|
|
| MD5 |
36f80f8996579ed3120113814fbfc8e4
|
|
| BLAKE2b-256 |
b13282befdee59855a2ba43bd12be9511194cde1067794d2c7a6e10c2265c0ae
|