supercalculator


Namesupercalculator JSON
Version 0.1.8 PyPI version JSON
download
home_page
SummaryA high precision calculator
upload_time2023-10-06 20:46:12
maintainer
docs_urlNone
authorRaymond Grottodden
requires_python
licenseMIT
keywords calculator precise math
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ---
This is a super calculator that is designed to do calculations with numbers from very large numbers, or very small decimals.

---

# Functions
## Addition
*Adds 2 numbers together*

`def addition(value1 : str, value2 : str) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.addition("-1", "5")
print(equals)

Out:    "4"
```

---
## Subtraction
*Subtracts 2 numbers*

`def subtraction(value1 : str, value2 : str) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.subtraction("10", "17")
print(equals)

Out:    "-7"
```

---
## Multiplication
*Multiplies 2 numbers together*

`def multiplication(value1 : str, value2 : str) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.multiplication("4", "8")
print(equals)

Out:    "32"
```

---
## Division
*Divides 2 numbers*

`def division(value1 : str, value2 : str, precision : int = 100) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.division("6", "3")
print(equals)

Out:    "2"
```

---
## Exponential
*Multiplies a number by itself x times*

`def exponent(value : str, exp : str) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.exponent("4", "2")
print(equals)

Out:    "16"
```

---
## Factorial
*Factorial*

`def factorial(value : str) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.factorial("4")
print(equals)

Out:    "24"
```

---
## Sin
*Outputs sin of number*

`def sin(value : str, precision : int = 10) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.sin("1")
print(equals)

Out:    "0.84147098484930199201"
```

---
## Square root
*Outputs square_root of a number*

`def square_root(value : str, precision : int = 100) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.square_root("16")
print(equals)

Out:    "4"
```

---
## Round
*Rounds a number*

`def round(value : str, decimals : int = 0) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.round("16.5")
print(equals)

Out:    "17"
```
## Limits
*Find what an equation equals as x->value*

`def limit(equation, x_goes_towards : str, precision : int = 100) -> str:...`

**Example**
```
import supercalculator as calc

equals = calc.limit(equation = "(5 / (x ^ 2))", x_goes_towards = "0")
print(equals)

Out:    "infinity"
```

---
# Precision default
```
class Precision:
    limit = 100
    square_root = 100
    sin = 10
    division = 100
```

## Change default

**Example**
```
print(Precision().division)
Precision.division = 200

print(Precision().division)

Out[1]: 100
Out[2]: 200
```

---
# Equation Builder

**DISCLAIMER** *Factorials do __NOT__ work in equation builder yet!!*

`def calculate(equation : str, x_val : str = None) -> str:...`

**x_val** is necessary if x is in the equation and is not defined.
- Limits define x values, **only** in the limit.

## Syntax
*Parentheses __must__ be around any operation.*

**Example**

`x - (4 * x ^2)` would be `(x - (4 *(x^2)))`

---
*X values for limits go on lower line*

**Example**

For `limit(equation = "1/x", x_goes_towards = 0)` it would be:
```
"""
lim(1 / x)
x->0
"""
```
**For multiple limits**
```
"""
(lim(1 / x) / lim(2 ^ x))
x->0.1        x->3
"""
```

---
*Functions such as sqrt(), and sin() act like parentheses*

**Example**
`"sqrt(x - 3)"`

---

Change Log
==========

0.1.8 (10/6/2023)
-----------------
- Fixed square roots in equation builder
- Fixed division hanging
- Added Precision default changer to docs

0.1.6 (10/6/2023)
-----------------
- Made specific 10 ^ #, 100 ^ #... algorithm
- Made negative exponents 

0.1.5 (10/5/2023)
-------------------
- Massive limits fix
- Fixed decimal exponent problem (cannot do decimal exponents)

0.1.401 (10/3/2023)
-------------------
- Fixed -0

0.1.4 (10/3/2023)
-----------------
- Fixed limits
- Changed limit precision default from 50 -> 100

0.1.3 (10/3/2023)
-----------------
- Updated documentation

0.1.2 (10/2/2023)
-----------------
- Fixed negative numbers in limits

0.1.1 (10/2/2023)
-----------------
- Added functionality to equation builder.
- Added functions / limits

0.1.0 (10/1/2023)
-----------------
- Initial Release

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "supercalculator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "calculator,precise,math",
    "author": "Raymond Grottodden",
    "author_email": "raymondgrotto651@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/88/11/a3b1ff419abb1b2344cb7b115499f5925329e113b8ca2f30c7b2e00837fe/supercalculator-0.1.8.tar.gz",
    "platform": null,
    "description": "---\r\nThis is a super calculator that is designed to do calculations with numbers from very large numbers, or very small decimals.\r\n\r\n---\r\n\r\n# Functions\r\n## Addition\r\n*Adds 2 numbers together*\r\n\r\n`def addition(value1 : str, value2 : str) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.addition(\"-1\", \"5\")\r\nprint(equals)\r\n\r\nOut:    \"4\"\r\n```\r\n\r\n---\r\n## Subtraction\r\n*Subtracts 2 numbers*\r\n\r\n`def subtraction(value1 : str, value2 : str) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.subtraction(\"10\", \"17\")\r\nprint(equals)\r\n\r\nOut:    \"-7\"\r\n```\r\n\r\n---\r\n## Multiplication\r\n*Multiplies 2 numbers together*\r\n\r\n`def multiplication(value1 : str, value2 : str) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.multiplication(\"4\", \"8\")\r\nprint(equals)\r\n\r\nOut:    \"32\"\r\n```\r\n\r\n---\r\n## Division\r\n*Divides 2 numbers*\r\n\r\n`def division(value1 : str, value2 : str, precision : int = 100) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.division(\"6\", \"3\")\r\nprint(equals)\r\n\r\nOut:    \"2\"\r\n```\r\n\r\n---\r\n## Exponential\r\n*Multiplies a number by itself x times*\r\n\r\n`def exponent(value : str, exp : str) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.exponent(\"4\", \"2\")\r\nprint(equals)\r\n\r\nOut:    \"16\"\r\n```\r\n\r\n---\r\n## Factorial\r\n*Factorial*\r\n\r\n`def factorial(value : str) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.factorial(\"4\")\r\nprint(equals)\r\n\r\nOut:    \"24\"\r\n```\r\n\r\n---\r\n## Sin\r\n*Outputs sin of number*\r\n\r\n`def sin(value : str, precision : int = 10) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.sin(\"1\")\r\nprint(equals)\r\n\r\nOut:    \"0.84147098484930199201\"\r\n```\r\n\r\n---\r\n## Square root\r\n*Outputs square_root of a number*\r\n\r\n`def square_root(value : str, precision : int = 100) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.square_root(\"16\")\r\nprint(equals)\r\n\r\nOut:    \"4\"\r\n```\r\n\r\n---\r\n## Round\r\n*Rounds a number*\r\n\r\n`def round(value : str, decimals : int = 0) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.round(\"16.5\")\r\nprint(equals)\r\n\r\nOut:    \"17\"\r\n```\r\n## Limits\r\n*Find what an equation equals as x->value*\r\n\r\n`def limit(equation, x_goes_towards : str, precision : int = 100) -> str:...`\r\n\r\n**Example**\r\n```\r\nimport supercalculator as calc\r\n\r\nequals = calc.limit(equation = \"(5 / (x ^ 2))\", x_goes_towards = \"0\")\r\nprint(equals)\r\n\r\nOut:    \"infinity\"\r\n```\r\n\r\n---\r\n# Precision default\r\n```\r\nclass Precision:\r\n    limit = 100\r\n    square_root = 100\r\n    sin = 10\r\n    division = 100\r\n```\r\n\r\n## Change default\r\n\r\n**Example**\r\n```\r\nprint(Precision().division)\r\nPrecision.division = 200\r\n\r\nprint(Precision().division)\r\n\r\nOut[1]: 100\r\nOut[2]: 200\r\n```\r\n\r\n---\r\n# Equation Builder\r\n\r\n**DISCLAIMER** *Factorials do __NOT__ work in equation builder yet!!*\r\n\r\n`def calculate(equation : str, x_val : str = None) -> str:...`\r\n\r\n**x_val** is necessary if x is in the equation and is not defined.\r\n- Limits define x values, **only** in the limit.\r\n\r\n## Syntax\r\n*Parentheses __must__ be around any operation.*\r\n\r\n**Example**\r\n\r\n`x - (4 * x ^2)` would be `(x - (4 *(x^2)))`\r\n\r\n---\r\n*X values for limits go on lower line*\r\n\r\n**Example**\r\n\r\nFor `limit(equation = \"1/x\", x_goes_towards = 0)` it would be:\r\n```\r\n\"\"\"\r\nlim(1 / x)\r\nx->0\r\n\"\"\"\r\n```\r\n**For multiple limits**\r\n```\r\n\"\"\"\r\n(lim(1 / x) / lim(2 ^ x))\r\nx->0.1        x->3\r\n\"\"\"\r\n```\r\n\r\n---\r\n*Functions such as sqrt(), and sin() act like parentheses*\r\n\r\n**Example**\r\n`\"sqrt(x - 3)\"`\r\n\r\n---\r\n\r\nChange Log\r\n==========\r\n\r\n0.1.8 (10/6/2023)\r\n-----------------\r\n- Fixed square roots in equation builder\r\n- Fixed division hanging\r\n- Added Precision default changer to docs\r\n\r\n0.1.6 (10/6/2023)\r\n-----------------\r\n- Made specific 10 ^ #, 100 ^ #... algorithm\r\n- Made negative exponents \r\n\r\n0.1.5 (10/5/2023)\r\n-------------------\r\n- Massive limits fix\r\n- Fixed decimal exponent problem (cannot do decimal exponents)\r\n\r\n0.1.401 (10/3/2023)\r\n-------------------\r\n- Fixed -0\r\n\r\n0.1.4 (10/3/2023)\r\n-----------------\r\n- Fixed limits\r\n- Changed limit precision default from 50 -> 100\r\n\r\n0.1.3 (10/3/2023)\r\n-----------------\r\n- Updated documentation\r\n\r\n0.1.2 (10/2/2023)\r\n-----------------\r\n- Fixed negative numbers in limits\r\n\r\n0.1.1 (10/2/2023)\r\n-----------------\r\n- Added functionality to equation builder.\r\n- Added functions / limits\r\n\r\n0.1.0 (10/1/2023)\r\n-----------------\r\n- Initial Release\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A high precision calculator",
    "version": "0.1.8",
    "project_urls": null,
    "split_keywords": [
        "calculator",
        "precise",
        "math"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8811a3b1ff419abb1b2344cb7b115499f5925329e113b8ca2f30c7b2e00837fe",
                "md5": "a5d6152d1d6b8cdf55a7e4a82a94af9e",
                "sha256": "ffcaf03b48a04375c32dfad49e03d90ec3e7b55f337f3dcb27f863bf139fed92"
            },
            "downloads": -1,
            "filename": "supercalculator-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "a5d6152d1d6b8cdf55a7e4a82a94af9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10623,
            "upload_time": "2023-10-06T20:46:12",
            "upload_time_iso_8601": "2023-10-06T20:46:12.676743Z",
            "url": "https://files.pythonhosted.org/packages/88/11/a3b1ff419abb1b2344cb7b115499f5925329e113b8ca2f30c7b2e00837fe/supercalculator-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-06 20:46:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "supercalculator"
}
        
Elapsed time: 0.19464s