Skip to main content

Module containing a lot of general and commonly used mathematical functions.

Project description

Discord Server Invite PyPI Version Info

A Module containing a lot of general and commonly used mathematical functions written in Python.

Key Features

  • Commonly used and required mathematics operation in your finger tips.

  • Many new functions are being added regularly.

  • Proper error handling.

  • Easy to use.

  • Optimised in both speed and memory.

Installing

Python 3.x is recommended, but you can also install it on python2.x

To install the module, you can just run the following command:

# Linux/macOS (Replace python3 with python to install for python2.x)
python3 -m pip install -U mathematics

# Windows
pip install -U mathematics

To install the development version, do the following:

$ git clone https://github.com/FireHead90544/mathemagic
$ cd mathemagic
$ python3 -m pip install -U .

Quick Example

import mathemagic

mathemagic.pi(4) # Returns 3.1415, the value of pi till 4 digits after decimal.

mathemagic.even(140) # Returns True, as 140 is an even number.

mathemagic.calculate("100 + 200 - 150") # Returns 150, tries calculating the expression given.

mathemagic.factorial(5) # Returns 120 as 5! = 120, returns the factorial of a given number.

mathemagic.prime(20) # Returns False, as 20 is not a prime number, returns True/False based upon the number is prime or not.

You can find more examples in the documentation.

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

mathemagic-1.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

mathemagic-1.1-py3-none-any.whl (16.3 kB view hashes)

Uploaded Python 3

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