Skip to main content

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fasttrig-0.1.5-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

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

Hashes for fasttrig-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9ef69447e2331efc2d0f3602b9101eebadd48ad25b475388ab9235cf1ac13921
MD5 198ebc8c79ec84b1b72b9c954efc0a6b
BLAKE2b-256 d36e6e07ec2c308767e45fb78ad3c1d2a75df724a2068287366fa17f9318470e

See more details on using hashes here.

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

Hashes for fasttrig-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8fb8f4b204b53a590d432e08367711d1d754babefe353ccc3f393f60a1791b18
MD5 36f80f8996579ed3120113814fbfc8e4
BLAKE2b-256 b13282befdee59855a2ba43bd12be9511194cde1067794d2c7a6e10c2265c0ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page