BubbleMath


NameBubbleMath JSON
Version 0.0.4 PyPI version JSON
download
home_page
Summary
upload_time2023-11-11 15:04:56
maintainer
docs_urlNone
authorSoapDoesCode
requires_python
license
keywords python math calculations calculator bubble math
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # BubbleMath


## Overview
BubbleMath is a lightweight Python library for common mathematical operations and equations such as the quadratic formula and the Pythagorean Theorem (as well as inverse pythag).

## Usage

To use the BubbleMath library, simply import it and call the desired functions.

## Examples

1. Import the `BubbleMath` library into your Python script.

    ```python
    import BubbleMath
    ```

2. Execute the desired functions.

    ### Square Root
    Calculate the square root of any number.
    ```python
    >>> square_root(4)
    2.0
    >>> square_root(2)
    1.4142135623730951
    >>> square_root(2, precision=5)
    1.41421 # Rounded to 5 decimal places
    ```
    
    ### Factorial
    Calculate the factorial of any non-negative integer.
    ```python
    >>> factorial(5)
    120
    >>> factorial(10)
    3628800
    ```
    
    ### Quadratic
    Calculate the roots of a quadratic equation using this formula:
    
    `x = (-b +- root(b^2 - 4ac)) / (2a)`
    
    ```python
    >>> quadratic(1, -3, 2)
    (2.0, 1.0)
    >>> quadratic(3, -5, 2, precision=3)
    (1.0, 0.667)  # Rounded to 3 decimal places
    >>> quadratic(1, 0, -2, precision=5)
    (1.41421, -1.41421)  # Rounded to 5 decimal places
    ```
    
    ### Pythagorean Theorem
    Calculate the length of the hypotenuse using the Pythagorean theorem.
    
    `a^2 + b^2 = c^2`
    
    ```python
    >>> pythag(3, 4)
    5.0
    >>> pythag(5, 9, 1) # Round to 1 decimal place
    10.3
    >>> pythag(2.3, 3.9, 3) # Round to 3 decimal places
    4.528
    ```
    
    ### Inverse Pythagorean Theorem
    Calculate the length of one missing side using the inverse Pythagorean theorem.
    
    `b^2 = c^2 - a^2`
    
    ```python
    >>> inverse_pythag(5, 4)
    3.0
    >>> inverse_pythag(4.528, 2.3)
    3.9
    >>> inverse_pythag(10.3, 5, 1)
    9.0
    ```
    
    
    
## Precision
For functions that return floats, you can choose your desired decimal point precision by passing the `precision=n` parameter at the end of the function you are executing, n being a positive integer. If left blank, the precision will use the function's default (all of these are in the type hints of the function itself).


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "BubbleMath",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,math,calculations,calculator,bubble math",
    "author": "SoapDoesCode",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/8f/2a/927644fe6873d390f94482efec9e57aa93ba813c1f9ea064e34a51318737/BubbleMath-0.0.4.tar.gz",
    "platform": null,
    "description": "# BubbleMath\r\n\r\n\r\n## Overview\r\nBubbleMath is a lightweight Python library for common mathematical operations and equations such as the quadratic formula and the Pythagorean Theorem (as well as inverse pythag).\r\n\r\n## Usage\r\n\r\nTo use the BubbleMath library, simply import it and call the desired functions.\r\n\r\n## Examples\r\n\r\n1. Import the `BubbleMath` library into your Python script.\r\n\r\n    ```python\r\n    import BubbleMath\r\n    ```\r\n\r\n2. Execute the desired functions.\r\n\r\n    ### Square Root\r\n    Calculate the square root of any number.\r\n    ```python\r\n    >>> square_root(4)\r\n    2.0\r\n    >>> square_root(2)\r\n    1.4142135623730951\r\n    >>> square_root(2, precision=5)\r\n    1.41421 # Rounded to 5 decimal places\r\n    ```\r\n    \r\n    ### Factorial\r\n    Calculate the factorial of any non-negative integer.\r\n    ```python\r\n    >>> factorial(5)\r\n    120\r\n    >>> factorial(10)\r\n    3628800\r\n    ```\r\n    \r\n    ### Quadratic\r\n    Calculate the roots of a quadratic equation using this formula:\r\n    \r\n    `x = (-b +- root(b^2 - 4ac)) / (2a)`\r\n    \r\n    ```python\r\n    >>> quadratic(1, -3, 2)\r\n    (2.0, 1.0)\r\n    >>> quadratic(3, -5, 2, precision=3)\r\n    (1.0, 0.667)  # Rounded to 3 decimal places\r\n    >>> quadratic(1, 0, -2, precision=5)\r\n    (1.41421, -1.41421)  # Rounded to 5 decimal places\r\n    ```\r\n    \r\n    ### Pythagorean Theorem\r\n    Calculate the length of the hypotenuse using the Pythagorean theorem.\r\n    \r\n    `a^2 + b^2 = c^2`\r\n    \r\n    ```python\r\n    >>> pythag(3, 4)\r\n    5.0\r\n    >>> pythag(5, 9, 1) # Round to 1 decimal place\r\n    10.3\r\n    >>> pythag(2.3, 3.9, 3) # Round to 3 decimal places\r\n    4.528\r\n    ```\r\n    \r\n    ### Inverse Pythagorean Theorem\r\n    Calculate the length of one missing side using the inverse Pythagorean theorem.\r\n    \r\n    `b^2 = c^2 - a^2`\r\n    \r\n    ```python\r\n    >>> inverse_pythag(5, 4)\r\n    3.0\r\n    >>> inverse_pythag(4.528, 2.3)\r\n    3.9\r\n    >>> inverse_pythag(10.3, 5, 1)\r\n    9.0\r\n    ```\r\n    \r\n    \r\n    \r\n## Precision\r\nFor functions that return floats, you can choose your desired decimal point precision by passing the `precision=n` parameter at the end of the function you are executing, n being a positive integer. If left blank, the precision will use the function's default (all of these are in the type hints of the function itself).\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "",
    "version": "0.0.4",
    "project_urls": null,
    "split_keywords": [
        "python",
        "math",
        "calculations",
        "calculator",
        "bubble math"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23d414490ce95b2d0e0a074a565e966da15fbf051e5d9e9f8e577d66f0183626",
                "md5": "dc7cd129f2bf0030baae28a4e743767c",
                "sha256": "a8ac6da9e33361cce3f59dd22b9c72c0b5969e24aabb56489224faf727af0c47"
            },
            "downloads": -1,
            "filename": "BubbleMath-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc7cd129f2bf0030baae28a4e743767c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3649,
            "upload_time": "2023-11-11T15:04:54",
            "upload_time_iso_8601": "2023-11-11T15:04:54.942419Z",
            "url": "https://files.pythonhosted.org/packages/23/d4/14490ce95b2d0e0a074a565e966da15fbf051e5d9e9f8e577d66f0183626/BubbleMath-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f2a927644fe6873d390f94482efec9e57aa93ba813c1f9ea064e34a51318737",
                "md5": "42bd9cbc4f88e5331e52c1018c5b4e1a",
                "sha256": "a325a44901f8dfc94828d6490c1017b9cd07d4398c3117be8605639954f860eb"
            },
            "downloads": -1,
            "filename": "BubbleMath-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "42bd9cbc4f88e5331e52c1018c5b4e1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3321,
            "upload_time": "2023-11-11T15:04:56",
            "upload_time_iso_8601": "2023-11-11T15:04:56.299554Z",
            "url": "https://files.pythonhosted.org/packages/8f/2a/927644fe6873d390f94482efec9e57aa93ba813c1f9ea064e34a51318737/BubbleMath-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-11 15:04:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "bubblemath"
}
        
Elapsed time: 0.13600s