Skip to main content

Library of Mathematical functions and Algorithms

Project description

https://img.shields.io/pypi/v/mathslib.svg Documentation Status

mathslib is a compilation of Mathematical Functions and Algorithms I have made or come across. I have used most of these for Project Euler.

See my website ivl-projecteuler.com for their implementation

See the full documentation here

Breakdown

numtheory.py

  • divisors_of(x, include_x)

  • divisors(x, n)

  • continued_fraction(x)

  • overall_fraction(x)

  • phi(x)

  • Mobius(x)

  • ppt(limit, non_primitive)

  • legendre_factorial(x)

  • tonelli_shanks(a, p)

  • ChineseRemainderTheorem(a1, a2, n1, n2)

prime.py

  • Prime_Sieve(limit, block_size, segment, values)

  • is_prime(x)

  • prime_factors(x)

fib.py

  • fibonacci(n)

  • fib_till(limit)

  • ZeckendorfRepresentation(x)

algorithms.py

  • PrimsAlgorithm(matrix)

  • DijkstrasAlgorithm(matrix, start_node, end_node)

  • KnapSack(values, weights, n, W, no_values)

  • KnapSackValues(values, weights, n, W, no_values)

simple.py

  • n_choose_r(n, r)

  • numberToBase(n, b)

  • lcm(a_list)

  • ModDivision(a, b, m)

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

mathslib-2.1.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

mathslib-2.1.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file mathslib-2.1.0.tar.gz.

File metadata

  • Download URL: mathslib-2.1.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for mathslib-2.1.0.tar.gz
Algorithm Hash digest
SHA256 5018fb0559c5746023fa80b41545e9b5f0eb43fad30bb4c8d9d3ca87d0d4e8ae
MD5 4d42130f315c4a2ab6f56879c8297760
BLAKE2b-256 c5154e4bc84f5450efec4d9cf2b53bfc1570a18326d5336897813841918a904d

See more details on using hashes here.

File details

Details for the file mathslib-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: mathslib-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for mathslib-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 935cac6e57b98ed452664c0cd1189f52ba604ede275d2d85764f331e96674e30
MD5 9dfe906a08667d1ea6ec02874d4299ee
BLAKE2b-256 7eb5be143536f87ea4e66942f56df8941cb4ae779881278dab1b2336ef20ca5b

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