Skip to main content

A package for approximating SciPy functions

Project description

ApproxSciMate

A python library for approximating SciPy functions with different levels of accuracy. The library is intended to bring awareness to the energy usage of computer systems, and to give users a choice in how much they consume.

Read the descriptions of the functions and their levels of approximation below, pick what is best for your use case.

Functions

cbrt(n, level=0)

Calculates the cube root of the provided number n with the accuracy specified at the level.

  • level = 0 : The default SciPy cbrt function providing maximum accuracy.
  • level = 1 : Halley's method for approximating cube roots, for moderate accuracy.
  • level = 2 : Newton's method for approximating cube roots, for low accuracy.

comb(n, k, level=0)

Calculates the amount of possible selections of k items from a set of size n where the order of selection does not matter. Approximates the value based on the defined level of accuracy.

  • level = 0 : The default SciPy comb function providing maximum accuracy.
  • level = 1 : The approximated lower bound of the calculation.
  • level = 2 : The approximated upper bound of the calculation.
  • level = 3 : Uses Stirling's method of approximating factorials which converges to the real value when n is very large.

perm(n, k, level=0)

Calculates the amount of possible selections of k items from a set of size n where the order of selection does matter. Approximates the value based on the defined level of accuracy.

  • level = 0 : The default SciPy perm function providing maximum accuracy.
  • level = 1 : The approximated lower bound of the calculation.
  • level = 2 : The approximated upper bound of the calculation.
  • level = 3 : Uses Stirling's method of approximating factorials which converges to the real value when n is very large.

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

approxscimate-0.0.4.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

approxscimate-0.0.4-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file approxscimate-0.0.4.tar.gz.

File metadata

  • Download URL: approxscimate-0.0.4.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for approxscimate-0.0.4.tar.gz
Algorithm Hash digest
SHA256 55cbda7c122b208c433fc08ace34cb563d30882a36fcb13b4b036ff5d42a607b
MD5 55920cc0929fd235fb16b64d752d9005
BLAKE2b-256 e348202f5da172b183f14d810fdaf0d473b4f1506198470da445d3137667a20a

See more details on using hashes here.

File details

Details for the file approxscimate-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for approxscimate-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 211a406e0586731f36640c2a72a3a21d0b06d05fbc95c15896c722156bcf2133
MD5 eca037858f73e1e6b9bf81bc39c2eab5
BLAKE2b-256 c5b4050bde516262c651e304efb94271f24b5101710f42f69755738bf7b84eb9

See more details on using hashes here.

Supported by

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