{"id":25961657,"url":"https://github.com/iamjuniorb/pymaths","last_synced_at":"2025-03-04T19:40:48.625Z","repository":{"id":140991656,"uuid":"611538403","full_name":"IAmJuniorB/PyMaths","owner":"IAmJuniorB","description":"My own version of the Python Maths Module - PyMaths","archived":false,"fork":false,"pushed_at":"2024-02-07T04:27:46.000Z","size":511,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-07T05:39:58.150Z","etag":null,"topics":["documentation","libraries","library","markdown","math","maths","module","modules","python","pythonic","pythonic-code","style"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IAmJuniorB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-03-09T02:49:15.000Z","updated_at":"2024-02-07T05:40:04.239Z","dependencies_parsed_at":"2024-02-07T05:40:03.866Z","dependency_job_id":"3a4bed39-7a02-4997-81b8-b003733cac48","html_url":"https://github.com/IAmJuniorB/PyMaths","commit_stats":null,"previous_names":["iamjuniorb/pymaths"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmJuniorB%2FPyMaths","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmJuniorB%2FPyMaths/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmJuniorB%2FPyMaths/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmJuniorB%2FPyMaths/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IAmJuniorB","download_url":"https://codeload.github.com/IAmJuniorB/PyMaths/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241912974,"owners_count":20041457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","libraries","library","markdown","math","maths","module","modules","python","pythonic","pythonic-code","style"],"created_at":"2025-03-04T19:40:47.699Z","updated_at":"2025-03-04T19:40:48.613Z","avatar_url":"https://github.com/IAmJuniorB.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **\u0026Popf;\u0026yopf;\u0026Mopf;\u0026aopf;\u0026topf;\u0026hopf;\u0026sopf;**\n\n═════════════\n\u003e A forever work in progress library full of mathematical equations, constants, and algorithms.\n\n## Table of Contents\n\n- [Algorithms](#algorithm-class)\n- [Constants](#constants-class)\n- [Functions](#functions-class)\n- [Sequences](#sequences-class)\n- [Hyperbolic Functions](#hyperbolicfunctions-class)\n- [Complex Number](#complexnumber-class)\n- [Real Number](#realnumber-class)\n- [Rational Number](#rationalnumber-class)\n- [Integral Number](#integralnumber-class)\n\n---\n## **Algorithm Class**\n\nThis is a Python class that implements various algorithms, including finding the greatest common divisor using Euclid's algorithm, computing logarithms with a specified base, counting the occurrences of words in a text, and performing operations with fractions.\n\n### `addition [int | float]) -\u003e int | float`\n\nReturns the sum of integers and/or floats.\n\n\u003e ##### **Arguments:**\n\n        - *args [int | float]:\n                A variable-length argument list of integers and/or floats\n\n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The sum of the integers and/or floats in *args\n\n---\n### `subtract(int | float) -\u003e int | float`\n\nReturns integers or float of given numbers after being subtracted.\n\n\u003e ##### **Arguments:**\n\n        - *args ([int | float]):\n                A variable-length argument list of integers and/or floats\n\n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The result of subtracting the integers and/or floats in *args from the first argument\n\n---\n### `multiply(int | float) -\u003e int | float`\n\nReturns an integer or float of given numbers multiplied.\n\n\u003e ##### **Arguments:**\n\n        - *args ([int | float]):\n                A variable-length argument list of integers and/or floats\n    \n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The product of the integers and/or floats in *args\n\n---\n### `division_float(dividend: [int | float], divisor: [int | float]) -\u003e [int | float]`\n\nReturns a float of dividend divided by divisor.\n\n\u003e ##### **Arguments:**\n\n        - dividend ([int | float]):\n                The number to be divided (dividend)\n\n        - divisor ([int | float]):\n                The number to divide by (divisor)\n    \n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The result of dividing the dividend by the divisor, as a float\n\n---\n### `division_int(dividend: [int | float], divisor: [int | float]) -\u003e [int | float]`\n\nReturns an integer of dividend divided by divisor.\n\n\u003e ##### **Arguments:**\n\n        - dividend ([int | float]):\n                The number to be divided (dividend)\n    \n        - divisor ([int | float]):\n                The number to divide by (divisor)\n\n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The result of dividing the dividend by the divisor, rounded down to the nearest integer\n\n---\n### `division_remainder(dividend: [int | float], divisor: [int | float]) -\u003e [int | float]`\n\nReturns the remainder of dividend divided by divisor.\n\n\u003e ##### **Arguments:**\n\n        - dividend ([int | float]):\n                The number to be divided (dividend)\n\n        - divisor ([int | float]):\n                The number to divide by (divisor)\n\n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The remainder of dividing the dividend by the divisor\n\n---\n### `power(base: [int | float], exponent: [int | float]) -\u003e [int | float]`\n\nReturns base to the power of exponent.\n\n\u003e ##### **Arguments:**\n\n        - base ([int | float]):\n                The base of the power operation\n\n        - exponent ([int | float]):\n                The exponent of the power operation\n\n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The result of raising the base to the power of the exponent\n\n---\n### `log(self, x, base=10)`\n\nReturns the logarithm of x with a specified base (default is 10)\n\n\u003e ##### **Arguments:**\n    \n        - x (int/float):\n                The value for which to compute the logarithm\n        \n        - base (int/float, optional):\n                The base of the logarithm. Defaults to 10.\n\n\u003e ##### **Returns:**\n\n        - [int | float]:\n                The logarithm of x with the specified base\n\n---\n### `__ln(self, x)`\n\nReturns the natural logarithm of x (base e)\n\n\u003e ##### **Arguments:**\n\n        - x (int/float):\n                The value for which to compute the natural logarithm\n\n\u003e ##### **Returns:**\n\n        The natural logarithm of x\n---\n### `__log10(self, x)`\n\nReturns the logarithm of x (base 10)\n\n\u003e ##### **Arguments:**\n\n        - x (int/float):\n                The value for which to compute the logarithm\n\n\u003e ##### **Returns:**\n\n        The logarithm of x (base 10)\n        \n---\n### `adding_fractions(self, *args)`\n\nReturns the sum of multiple fractions\n\n\u003e ##### **Arguments:**\n\n        - *args (tuples):\n                Multiple fractions represented as tuples of the form (numerator, denominator)\n\n\u003e ##### **Returns:**\n\n        A tuple representing the sum of all fractions in reduced form (numerator, denominator)\n        \n---\n### `find_gcd(self, a, b)`\n\nFinds the greatest common divisor of two numbers using Euclid's algorithm.\n\n\u003e ##### **Arguments:**\n\n        - a:\n                An integer\n        \n        - b:\n                Another integer\n\n\u003e ##### **Returns:**\n\n        The greatest common divisor of a and b\n        \n---\n### `count_words(text)`\n\nReturns a dictionary containing the count of each word in the given text.\n\n\u003e ##### **Arguments:**\n\n        - text (str):\n                The text to count the words in.\n\n\u003e ##### **Returns:**\n\n        A dictionary where the keys are the unique words in the text and the values are the count of each word.\n\n---\n### `multiplying_fractions(self, *args)`\n\nReturns the product of multiple fractions.\n\n\u003e ##### **Arguments:**\n\n        - An arbitrary number of arguments. Each argument must be a tuple with two values, the numerator and denominator of a fraction.\n\n\u003e ##### **Returns:**\n\n        A tuple containing the numerator and denominator of the product of the fractions.\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If any of the arguments are not tuples of length 2 or if any of the denominators are 0.\n\n---\n### `divide_fractions(self,#### **arguments:** tuple[int, - nt]) -\u003e tuple[int, int]`\n\nReturns the result of dividing one fraction by another.\n\n\u003e ##### **Arguments:**\n\n        - Two tuples, each with two values, representing the numerator and denominator of the two fractions.\n\n\u003e ##### **Returns:**\n\n        A tuple containing the numerator and denominator of the quotient of the two fractions.\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If any of the arguments are not tuples of length 2.\n        \n        - ZeroDivisionError:\n                If the denominator of the second fraction is zero.\n        \n---        \n### `proportion_rule(a: int, b: int, c: int = None, d: int = None) -\u003e int`\n\nReturns the fourth proportional number given three proportional numbers.\n    \n\u003e ##### **Arguments:**\n\n        - a (int):\n                The first proportional number.\n        \n        - b (int):\n                The second proportional number.\n        \n        - c (int, optional):\n                The third proportional number. Defaults to None.\n        \n        - d (int, optional):\n                The fourth proportional number. Defaults to None.\n        \n\u003e ##### **Returns:**\n\n        - int:\n                The fourth proportional number calculated from the input.\n        \n        If both `c` and `d` are None, `a` and `b` are assumed to be the first two proportional numbers, and `c` and `d` are set to `b` and `a` respectively. If `d` is None, `a` and `b` are assumed to be the first two proportional numbers, and `d` is calculated from `c` using the formula `d = (b * c) / a`. If `c` and `d` are both specified, `a` and `b` are assumed to be the first two proportional numbers, and the function calculates the fourth proportional number `x` using the formula `x = (b * d) / c`.\n        \n---\n### `percentage_to_fraction(x: float) -\u003e float`\n\nThis function converts a percantage `x` to a fraction.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                percentage\n            \n\u003e ##### **Returns:**\n\n        The fraction form of a percentage\n\n---\n### `fraction_to_percentage(numerator: int, denominator: int) -\u003e float`\n\nThis function converts a fraction given by `numerator` and `denominator` to a percentage.\n\n\u003e ##### **Arguments:**\n\n        - numerator:\n                The numerator of the fraction.\n      \n        - denominator:\n                The denominator of the fraction.\n\n\u003e ##### **Returns:**\n\n        The fraction as a percentage.\n            \n---\n### `linear_search(lst, target)`\n\nSearches for the target element in the given list and returns the index if found, otherwise returns -1.\n\n\u003e ##### **Arguments:**\n\n        - lst : list\n                The list to be searched.\n\n        - target : any\n                The target element to be searched for in the list.\n\n\u003e ##### **Returns:**\n\n        - int\n                If the target is found in the list, the index of the target is returned.\n                Otherwise, -1 is returned.\n\n---\n### `binary_search(lst, target)`\n\nSearches for the target element in the given list using binary search and returns\nthe index if found, otherwise returns -1.\n\n\u003e ##### **Arguments:**\n\n        - lst : list\n                The list to be searched.\n\n        - target : any\n                The target element to be searched for in the list.\n\n\u003e ##### **Returns:**\n\n        - int\n                If the target is found in the list, the index of the target is returned.\n                Otherwise, -1 is returned.\n\n---\n### `bubble_sort(lst)`\n\nSorts the given list in ascending order using bubble sort and returns the sorted list.\n\n\u003e ##### **Arguments:**\n\n        - lst (list):\n                The list to be sorted.\n\n\u003e ##### **Returns:**\n\n        - list:\n                The sorted list in ascending order.\n        \n---\n### `insertion_sort(lst)`\n\nSorts the given list in ascending order using insertion sort and returns the sorted list.\n\n\u003e ##### **Arguments:**\n\n        - lst (list):\n                The list to be sorted.\n\n\u003e ##### **Returns:**\n\n        - list:\n                The sorted list in ascending order.\n\n---\n### `merge_sort(lst)`\n\nSorts the given list in ascending order using merge sort and returns the sorted list.\n\n\u003e ##### **Arguments:**\n\n        - lst (list):\n                The list to be sorted.\n\n\u003e ##### **Returns:**\n\n        - list:\n                The sorted list in ascending order.\n\n---\n### `square_root(num)`\n\nThis function computes the square root of a given number `num` using the Babylonian method.\n\n\u003e ##### **Arguments:**\n\n        - num (float):\n                The number to find the square root of.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The square root of the given number.\n\n---\n### `factorial(num)`\n\nThis function computes the factorial of a given number `num`.\n\n\u003e ##### **Arguments:**\n      \n        - num (int):\n                The number to find the factorial of.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The factorial of the given number.\n        \n---\n### `fibonacci(n)`\n\nCompute the nth number in the Fibonacci sequence.\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The index of the desired Fibonacci number.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The nth number in the Fibonacci sequence.\n    \n---\n### `is_prime(num)`\n\nCheck whether a given number is prime.\n\n\u003e ##### **Arguments:**\n\n        - num (int):\n                The number to check for primality.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the number is prime, False otherwise.\n    \n---\n### `gcd(*args)`\n\nCompute the greatest common divisor of two or more numbers.\n\n\u003e ##### **Arguments:**\n\n        - *args (int):\n                Two or more numbers to find the GCD of.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The greatest common divisor of the given numbers.\n    \n---\n### `lcm(*args)`\n\nCompute the least common multiple of two or more numbers.\n\n\u003e ##### **Arguments:**\n\n        - *args (int):\n                Two or more numbers to find the LCM of.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The least common multiple of the given numbers.\n    \n---\n### `sort_numbers(numbers: List[[int | float]], reverse: bool = False) -\u003e List[[int | float]]`\n\nThis function takes a list of numbers and returns a sorted list in ascending or descending order.\n\n\u003e ##### **Arguments:**\n\n        - numbers (List[[int | float]]):\n                A list of integers or floats to be sorted.\n\n        - reverse (bool, optional):\n                If True, returns the list in descending order. Defaults to False.\n\n\u003e ##### **Returns:**\n\n        - List[[int | float]]:\n                A sorted list in ascending or descending order.\n    \n---\n### `binary_search(numbers: List[[int | float]], target: [int | float]) -\u003e int`\n\nThis function takes a sorted list of numbers and a target number and returns the index of the target number, or -1 if it is not found.\n\n\u003e ##### **Arguments:**\n\n        - numbers (List[[int | float]]):\n                A sorted list of integers or floats.\n    \n        - target ([int | float]):\n                The number to search for in the list.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The index of the target number in the list, or -1 if it is not found.\n    \n---\n### `linear_regression(x, y)`\n\nCalculates the equation of the line of best fit (y = mx + b) for the given x and y values.\n\n\u003e ##### **Arguments:**\n\n        - x (list):\n                A list of x values.\n\n        - y (list):\n                A list of corresponding y values.\n\n\u003e ##### **Returns:**\n\n        - tuple:\n                A tuple containing the slope (m) and y-intercept (b) of the line of best fit.\n    \n---    \n### `matrix_addition`\n\nThis function takes in two matrices A and B of the same size, and returns their sum.\n\n\u003e ##### **Arguments:**\n\n        - A:\n                A list of lists of floats representing the first matrix.\n    \n        - B:\n                 list of lists of floats representing the second matrix.\n\n\u003e ##### **Returns:**\n\n        A list of lists of floats representing the sum of the matrices.\n    \n---\n### `matrix_multiplication`\n\nThis function multiplies two matrices A and B and returns the resulting matrix.\n\n\u003e ##### **Arguments:**\n\n        - A:\n                The first matrix.\n        - B:\n                The second matrix.\n\n\u003e ##### **Returns:**\n\n        A list of lists of floats representing the product of matrices A and B.\n    \n---\n### `matrix_inversion`\n\nThis function inverts a matrix A and returns the resulting matrix.\n\n\u003e ##### **Arguments:**\n\n        - A:\n                The matrix to be inverted.\n\n\u003e ##### **Returns:**\n\n        A list of lists of floats representing the inverted matrix of A.\n    \n---\n### `matrix_multiplication(A, B):`\n\nMultiplies two matrices A and B and returns the resulting matrix.\n\n\u003e ##### **Arguments:**\n\n        - A (list[list[float]]):\n                The first matrix.\n        \n        - B (list[list[float]]):\n                The second matrix.\n\n\u003e ##### **Returns:**\n\n        - list[list[float]]:\n                The matrix product of A and B.\n\n---\n### `matrix_inversion(A):`\n\nInverts a matrix A and returns the resulting matrix.\n\n\u003e ##### **Arguments:**\n\n        - A (list[list[float]]):\n                The matrix to be inverted.\n\n\u003e ##### **Returns:**\n\n        - list[list[float]]:\n                The inverted matrix of A.\n        \n---        \n### `newton_method(self, f, f_prime, x0, epsilon):`\n\nUse Newton's method to find the root of a function f.\n\n\u003e ##### **Arguments:**\n        \n        - f (function):\n                The function for which to find the root.\n        \n        - f_prime (function):\n                The derivative of f.\n        \n        - x0 (float):\n                The initial guess for the root.\n        \n        - epsilon (float):\n                The desired level of accuracy.\n\n\u003e ##### **Returns:**\n        \n        - root (float):\n                The estimated root of the function.\n        \n ---   \n### `gradient_descent(self, f, f_prime, x0, alpha, max_iters):`\n\nUse gradient descent to find the minimum of a function f.\n\n\u003e ##### **Arguments:**\n        \n        - f (function):\n                The function to minimize.\n        \n        - f_prime (function):\n                The derivative of f.\n        \n        - x0 (float):\n                The initial guess for the minimum.\n        \n        - alpha (float):\n                The step size.\n        \n        - max_iters (int):\n                The maximum number of iterations.\n\n\u003e ##### **Returns:**\n\n        - minimum (float):\n                The estimated minimum of the function.\n\n---   \n### `monte_carlo_simulation(self, n, f):`\n\nUse Monte Carlo simulation to estimate the probability of an event.\n\n\u003e ##### **Arguments:**\n        \n        - n (int):\n                The number of simulations to run.\n        \n        - f (function):\n                A function that returns True or False for a given sample.\n\n\u003e ##### **Returns:**\n        \n        - probability (float):\n                The estimated probability of the event.\n        \n---\n### `distance(point1, point2):`\n\nCalculates the Euclidean distance between two points in a two-dimensional space.\n\n\u003e ##### **Arguments:**\n        \n        - point1 (tuple):\n                A tuple containing the coordinates of the first point as (x, y).\n        \n        - point2 (tuple):\n                A tuple containing the coordinates of the second point as (x, y).\n\n\u003e ##### **Returns:**\n\n        - float:    \n                The Euclidean distance between point1 and point2.\n\n\u003e ##### **Returns:**\n\n        The distance between the two points\n        \n---\n### `random_seed(seed):`\n\nA simple pseudorandom number generator based on the linear congruential method.\n\n\u003e ##### **Arguments:**\n\n        - seed (int):\n                The seed value used to initialize the generator.\n\n\u003e ##### **Returns:**\n\n        - A float between 0 and 1.\n        \n---\n### `k_means_clustering(self, data, k):`\n\nUse k-means clustering to group data points into k clusters.\n\n\u003e ##### **Arguments:**\n\n        - data (list):\n                A list of data points.\n        \n        - k (int):\n                The number of clusters to form.\n\n\u003e ##### **Returns:**\n\n        - clusters (list): A list of k clusters, each containing the data points assigned to that cluster.\n        \n---\n### `exp(self, num: [int | float]) -\u003e [int | float]:`\n\nReturns the exponential value of a number.\n\n\u003e ##### **Arguments:**\n\n        - num:\n                a number whose exponential value is to be calculated\n\n\u003e ##### **Returns:**\n\n        The exponential value of the input number\n        \n---\n### `absolute(self, num: [int | float]) -\u003e [int | float]:`\n\nReturns the absolute value of a number.\n\n\u003e ##### **Arguments:**\n\n        - num:\n                a number whose absolute value is to be calculated\n\n\u003e ##### **Returns:**\n\n        The absolute value of the input number\n        \n---\n### `modulo(self, dividend: [int | float], divisor: [int | float]) -\u003e [int | float]:`\n\nReturns the remainder of dividing the dividend by the divisor.\n\n\u003e ##### **Arguments:**\n\n        - dividend:\n                the number to be divided\n        \n        - divisor:\n                the number to divide by\n\n\u003e ##### **Returns:**\n        \n        The remainder of dividing the dividend by the divisor\n        \n---\n### `sin(self, num: [int | float]) -\u003e [int | float]:`\n\nReturns the sine value of a number.\n\n\u003e ##### **Arguments:**\n\n        - num:\n                a number in radians whose sine value is to be calculated\n\n\u003e ##### **Returns:**\n\n        The sine value of the input number\n        \n---\n### `cos(self, num: [int | float]) -\u003e [int | float]:`\n\nReturns the cosine value of a number.\n\n\u003e ##### **Arguments:**\n\n        - num:\n                a number in radians whose cosine value is to be calculated\n\n\u003e ##### **Returns:**\n\n        The cosine value of the input number\n\n---\n### `tan(self, num: [int | float]) -\u003e [int | float]:`\n\nReturns the tangent value of a number.\n\n\u003e ##### **Arguments:**\n\n        - num:\n                a number in radians whose tangent value is to be calculated\n\n\u003e ##### **Returns:**\n        \n        The tangent value of the input number\n\n\n### `def next_prime(n):`\n\nFinds the smallest prime number greater than n.\n\n\u003e #### **Arguments:**\n\n        - n (int):\n                A positive integer.\n\n\u003e #### **Returns:**\n\n        - int:\n                The smallest prime number greater than n.\n            \n\n### `def atan(x):`\n\nReturn the arc tangent of x, in radians.\n\n\u003e #### ***Arguments:**\n\n        - x (float):\n                The value whose arc tangent is to be returned.\n\n\u003e #### **Returns:**\n\n        - float\n                The arc tangent of x, in radians.\n\n### `def atan_helper(x):`\n\nHelper function for atan. Computes the arc tangent of x in the interval [0, 1].\n\n\u003e #### **Arguments:**\n\n        - x (float):\n                The value whose arc tangent is to be returned.\n\n\u003e #### **Returns:**\n\n        - float\n                The arc tangent of x, in radians.\n\n\n### `def arctan(x):`\n\nCalculates the arctangent of x using a Taylor series approximation.\n\n\u003e #### **Arguments:**\n\n        - x (float):\n                A real number.\n\n\u003e #### **Returns:**\n\n        - float:    \n                The arctangent of x in radians.\n\n        \n### `def sieve_of_eratosthenes(n: int) -\u003e List[int]:`\n\nReturns a list of prime numbers up to n using the sieve of Eratosthenes algorithm.\n        \n\u003e #### **Arguments:**\n\n        - n (int):\n                the upper limit of the list.\n            \n\u003e #### **Returns:**\n\n        - List[int]:\n                a list of prime numbers up to n.\n\n    \n### `def zeta(s, zeta_1, n):`\n\nReturns the value of the Riemann zeta function.\n\n\u003e #### **Arguments:**\n\n        - s (float):\n                The argument of the zeta function.\n\n        - zeta_1 (complex):\n                The initial value of the Riemann zeta function.\n        \n        - n (int):\n                The number of iterations to perform.\n\n\u003e #### **Returns:**\n\n        - complex:\n                The value of the Riemann zeta function.\n        \n\n### `def histogram(data, num_bins):`\n\nCompute the histogram of a list of data with a specified number of bins.\n\n\u003e #### **Arguments:**\n\n        - data (list):\n                A list of numeric data\n\n        - num_bins (int):\n                The number of bins to use in the histogram\n\n\u003e #### **Returns:**\n\n        - tuple:\n                A tuple containing the counts for each bin and the edges of the bins\n\n\n### `def islice(iterable, start, stop, step=1):`\n\nReturns an iterator that produces a slice of elements from the given iterable.\n\n\u003e #### **Arguments:**\n\n        - iterable (iterable):\n                The iterable to slice.\n\n        - start (int):\n                The index at which to start the slice.\n\n        - stop (int):\n                The index at which to stop the slice.\n\n        - step (int, optional):\n                The step size between slice elements. Defaults to 1.\n\n\u003e #### **Returns:**\n\n        - iterator:\n                An iterator that produces the slice of elements.\n\n### `def normal_distribution_cdf(x):`\n\nCalculates the cumulative distribution function (CDF) of a standard normal distribution at a given value.\n\n\u003e #### **Arguments:**\n\n        - x (float):\n                The value at which to calculate the CDF.\n\n\u003e #### **Returns:**\n\n        - float:    \n                The CDF of the standard normal distribution at x, accurate to 10 decimal places.\n\n\n\n---\n## **Constants Class**\n\nThis is a Python class full of mathematical constants such a Pi or the speed of light.\n\n### `speed_of_light(self):`\n\nReturns the speed of light in meters per second\n\n\u003e ##### **Arguments:**\n\n        - None\n\n\u003e ##### **Returns:**\n\n        The speed of light in meters/second at 299_792_458\n        \n---\n### `planck_constant(self):`\n\nReturns the Planck constant, denoted as h, in joule-seconds.\n\nThe Planck constant is a physical constant that is fundamental to quantum mechanics.\nIt relates the energy of a photon to its frequency and is approximately 6.626 x 10^-34 J*s.\n\n\u003e ##### **Returns:**\n            \n        - float:\n                The value of the Planck constant in joule-seconds.\n    \n### `pi(self):`\n\nThe ratio of a circle's circumference to its diameter.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - Pi π:\n                to the 20th decimal\n        \n        3.141_592_653_589_793_238_46\n        \n---\n### `tau(self):`\n\nthe 19th letter of the Greek alphabet,\nrepresenting the voiceless dental or alveolar plosive IPA: [t].\nIn the system of Greek numerals, it has a value of 300.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - tau, uppercase Τ, lowercase τ, or τ:\n                 to the 20th decimal\n        \n        6.283_185_307_179_586_476_92\n        \n---\n### `phi(self):`\n\n\"The Golden Ratio\"\nIn mathematics, two quantities are in the golden ratio\nif their ratio is the same as the ratio of their sum\nto the larger of the two quantities.\n\n\u003e ##### **Arguments:**\n\n        - None\n\n\u003e ##### **Returns:**\n\n        - Uppercase Φ lowercase φ or ϕ:\n                Value to the 20th decimal\n        \n        1.618_033_988_749_894_848_20\n        \n---\n### `silver_ratio(self):`\n\n\"The Silver Ratio\". Two quantities are in the silver ratio (or silver mean)\nif the ratio of the smaller of those two quantities to the larger quantity\nis the same as the ratio of the larger quantity to the sum of the\nsmaller quantity and twice the larger quantity\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - δS:\n                Value to the 20th decimal\n        \n        2.414_213_562_373_095_048_80\n        \n---\n### `supergolden_ratio(self):`\n\nReturns the mathematical constant psi (the supergolden ratio).\n\n\u003e ##### **Arguments:**\n\n        - None\n\n\u003e ##### **Returns:**\n        \n        - ψ:\n                to the 25th decimal\n        \n        return 1.465_571_231_876_768_026_656_731_2\n        \n---\n### `connective_constant(self):`\n\nReturns the connective constant for the hexagonal lattice.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - μ:\n                to the 4th decimal\n        \n        1.687_5\n        \n---\n### `kepler_bouwkamp_constant(self):`\n\nIn plane geometry, the Kepler–Bouwkamp constant (or polygon inscribing constant)\nis obtained as a limit of the following sequence.\nTake a circle of radius 1. Inscribe a regular triangle in this circle.\nInscribe a circle in this triangle. Inscribe a square in it.\nInscribe a circle, regular pentagon, circle, regular hexagon and so forth.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - K':\n                to the 20th decimal\n        \n        0.114_942_044_853_296_200_70\n        \n---\n### `def wallis_constant(self):`\n\nReturns Wallis's constant.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n      Value to the 20th decimal\n      \n      2.094_551_481_542_326_591_48\n      \n---\n### `eulers_number(self):`\n\nA mathematical constant approximately equal to 2.71828 that can be characterized in many ways.\nIt is the base of the natural logarithms.\nIt is the limit of (1 + 1/n)n as n approaches infinity, an expression that arises in the study of compound interest.\nIt can also be calculated as the sum of the infinite series\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - e:\n                Value to the 20th decimal. math.e\n      \n      2.718_281_828_459_045_235_36\n      \n---\n### `natural_log(self):`\n\nNatural logarithm of 2.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - ln 2:\n                Value to the 30th decimal. math.log(2)\n      \n      0.693_147_180_559_945_309_417_232_121_458\n      \n---\n### `lemniscate_constant(self):`\n\nThe ratio of the perimeter of Bernoulli's lemniscate to its diameter, analogous to the definition of π for the circle.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - ϖ:\n                Value to the 20th decimal. math.sqrt(2)\n      \n      2.622_057_554_292_119_810_46 \n      \n---\n### `eulers_constant(self):`\n\nNot to be confused with Euler's Number.\nDefined as the limiting difference between the harmonic series and the natural logarithm\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - γ:\n                Value to the 50th decimal\n      \n        0.577_215_664_901_532_860_606_512_090_082_402_431_042_159_335_939_92\n      \n---\n### `Erdős_Borwein_constant(self):`\n\nThe sum of the reciprocals of the Mersenne numbers\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - E:\n                Value to the 20th decimal. sum([1 / 2 ** (2 ** i) for i in range(40)])\n      \n        1.606_695_152_415_291_763_78\n      \n---\n### `omega_constant(self):`\n\nDefined as the unique real number that satisfies the equation Ωe**Ω = 1.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - Ω:\n                Value to the 30th decimal\n      \n        0.567_143_290_409_783_872_999_968_662_210\n      \n---\n### `Apérys_constant(self):`\n\nThe sum of the reciprocals of the positive cubes.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - ζ(3):\n                Value to the 45th decimal\n      \n        1.202_056_903_159_594_285_399_738_161_511_449_990_764_986_292\n      \n---\n### `laplace_limit(self):`\n\nThe maximum value of the eccentricity for which a solution to Kepler's equation, in terms of a power series in the eccentricity, converges.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        Value to the 35th decimal\n      \n        0.662_743_419_349_181_580_974_742_097_109_252_90\n      \n---\n### `ramanujan_soldner_constant(self):`\n\nA mathematical constant defined as the unique positive zero of the logarithmic integral function.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - μ ≈:\n                Value to the 45th decimal\n      \n        1.451_369_234_883_381_050_283_968_485_892_027_449_493_032_28\n      \n---\n### `gauss_constant(self):`\n\nTranscendental mathematical constant that is the ratio of the perimeter of\nBernoulli's lemniscate to its diameter, analogous to the definition of π for the circle.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - G == ϖ /π ≈ 0.8346268:\n                Value to the 7th decimal\n      \n        0.834_626_8\n      \n---\n### `second_hermite_constant(self):`\n\n_summary_\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - γ2 :\n                Value to the 20th decimal\n      \n        1.154_700_538_379_251_529_01\n---\n### `liouvilles_constant(self):`\n\nA real number x with the property that, for every positive integer n,\nthere exists a pair of integers (p,q) with q\u003e1.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - L:\n                Value to the 119th decimal\n      \n        0.110_001_000_000_000_000_000_001_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_01\n\n---\n### `first_continued_fraction(self):`\n\n_summary_\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n        \n        - C_{1}:\n                _description_\n      \n        0.697_774_657_964_007_982_01\n      \n---\n### `ramanujans_constant(self):`\n\nThe transcendental number, which is an almost integer, in that it is very close to an integer.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - e**{{\\pi {\\sqrt {163}}}}:\n                Value to the 18th decimal\n      \n        262_537_412_640_768_743.999_999_999_999_250_073\n      \n---\n### `glaisher_kinkelin_constant(self):`\n\nA mathematical constant, related to the K-function and the Barnes G-function.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - A:\n                Value to the 20th decimal\n      \n        1.282_427_129_100_622_636_87\n      \n---\n### `catalans_constant(self):`\n\nComputes the Catalan's constant to the specified number of decimal places using the formula:\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The number of terms to sum to approximate the constant.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The computed value of the Catalan's constant.\n\n\u003e ##### **Example:**\n\n        \u003e\u003e\u003e catalan_constant(1000000)\n        0.915965594177219\n\n---\n### `dottie_number(self):`\n\nCalculates the unique real root of the equation cos(x) = x, known as the Dottie number, to the 20th decimal place.\n\nThe Dottie number is a constant that arises in the study of iterative methods and has connections to chaos theory.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - float:\n                The Dottie number, i.e., the unique real root of the equation cos(x) = x, to the 20th decimal place.\n    \n\u003e ##### **Example:**\n\n        \u003e\u003e\u003e dottie_number()\n        0.73908513321516064165\n\n---\n### `meissel_mertens_constant(self):`\n\nReturns the Meissel-Mertens constant M to the 40th decimal place.\n\nThe Meissel-Mertens constant M is defined as the sum of the reciprocal of the primes up to n, where n is an arbitrary positive integer. It has important connections to prime number theory and the Riemann hypothesis.\n\nThis function uses a precomputed value of M to return the constant to the 40th decimal place.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - M (float):\n                The Meissel-Mertens constant M to the 40th decimal place.\n      \n        return 0.261_497_212_847_642_783_755_426_838_608_695_859_051_6\n\n\u003e ##### **Example:**\n\n        meissel_mertens_constant()\n        0.2614972128476427837554268386086958590516\n\n---\n### `universal_parabolic_constant(self):\n\nThe ratio, for any parabola, of the arc length of the parabolic segment formed by the latus rectum to the focal parameter.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - P:\n                Value to the 20th decimal\n      \n        2.295_587_149_392_638_074_03\n      \n---\n### `cahens_constant(self):`\n\nThe value of an infinite series of unit fractions with alternating signs.\n\n\u003e ##### **Arguments:**\n\n        - None\n        \n\u003e ##### **Returns:**\n\n        - C:\n                Value to the 20th decimal\n      \n        0.643_410_546_288_338_026_18\n      \n---\n### `gelfonds_constant(self):`\n\nCalculates Gelfond's Constant, which is defined as e raised to the power of pi.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Gelfond's Constant, which is approximately 23.1406926327792690057292.\n\n        return self.eulers_constant**self.pi\n    \n---\n### `gelfond_schneider_constant(self):`\n\nReturns the Gelfond-Schneider constant, which is a transcendental number defined as the value of \n2^(1/2) raised to the power of itself, or approximately 2.6651441426902251886502972498731.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Gelfond-Schneider constant.\n\n        pass\n\n---\n### `second_favard_constant(self):`\n\nReturns the Second Favard constant, which is a mathematical constant defined as the limit of the \narithmetic mean of the reciprocal of consecutive odd numbers, or approximately 0.661707182...\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Second Favard constant.\n\n        pass\n\n---\n### `golden_angle(self):`\n\nReturns the golden angle constant, which is the angle subtended by the smaller of the two angles \nformed by dividing the circumference of a circle in the golden ratio. It is equal to \n(3 - sqrt(5)) * 180 degrees / pi, or approximately 137.5077640500378546463487 degrees.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the golden angle constant in degrees.\n\n        pass\n\n---\n### `sierpinskis_constant(self):`\n\nReturns Sierpiński's constant, which is the fractal dimension of the Sierpiński triangle, a \nself-similar fractal shape. It is equal to log(3)/log(2), or approximately 1.585.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Sierpiński's constant.\n\n        pass\n\n---\n### `landau_ramanujan_constant(self):`\n\nReturns the Landau-Ramanujan constant, which is a mathematical constant that appears in the \nasymptotic expansion of the partition function. It is equal to e^(pi * sqrt(163)), or approximately\n2.2932021438344677e+17.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Landau-Ramanujan constant.\n\n        pass\n\n---\n### `first_nielsen_ramanujan_constant(self):`\n\nReturns the First Nielsen-Ramanujan constant, which is a mathematical constant that appears in \ncertain partition identities. It is equal to the product of a series involving the gamma function, \nor approximately 0.866081804933.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the First Nielsen-Ramanujan constant.\n\n        pass\n\n---\n### `gieseking_constant(self):`\n\nReturns Gieseking's constant, which is a mathematical constant that appears in the theory of \nharmonic analysis. It is equal to (2*pi)^(-3/4), or approximately 0.7511255444649425.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Gieseking's constant.\n\n        pass\n\n---\n### `bernsteins_constant(self):`\n\nReturns Bernstein's constant, which is a mathematical constant that appears in the theory of \nFourier analysis. It is equal to pi/sqrt(2), or approximately 2.221441469079183.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Bernstein's constant.\n\n        pass\n\n---\n### `tribonacci_constant(self):`\n\nReturns the Tribonacci constant, which is a mathematical constant defined as the unique real root \nof the polynomial x^3 - x^2 - x - 1, or approximately 1.8392867552141612.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        float:\n                The value of the Tribonacci constant.\n\n        pass\n\n    \n---\n### `bruns_constant(self):`\n\nReturns the limiting value of the sequence a(n) = sum(k=1 to n) 1/prime(k),\nwhere prime(k) is the kth prime number.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Bruns constant, accurate to 42 decimal places.\n\n        pass\n\n---\n### `twin_primes_constant(self):`\n\nReturns the limiting value of the sequence of twin primes (pairs of prime\nnumbers that differ by 2).\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the twin primes constant, accurate to 36 decimal places.\n\n        pass\n\n---\n### `plastic_number(self):`\n\nReturns the unique positive real root of x^3 = x + 1.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the plastic number, accurate to 32 decimal places.\n\n        pass\n\n---\n### `blochs_constant(self):`\n\nReturns the limiting value of the sequence of numbers that represent the\nBloch wall widths in ferromagnets.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Bloch's constant, accurate to 34 decimal places.\n\n        pass\n\n---\n### `z_score_975_percentile(self):`\n\nReturns the value that has 97.5% of the area under a standard normal distribution\nto the left of it.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the z-score at the 97.5th percentile, accurate to 9 decimal places.\n\n        pass\n\n---\n### `landaus_constant(self):`\n\nReturns the limiting value of the sequence of numbers that represent the\nprobability that a random permutation of n elements will have no cycle of length\ngreater than log(n).\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Landau's constant, accurate to 19 decimal places.\n\n        pass\n\n---\n### `landaus_third_constant(self):`\n\nReturns the limiting value of the sequence of numbers that represent the\nprobability that a random permutation of n elements will have no cycle of length\ngreater than sqrt(n) * log(n).\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Landau's third constant, accurate to 20 decimal places.\n\n        pass\n\n---\n### `prouhet_thue_morse_constant(self):`\n\nReturns the limiting value of the sequence of numbers that represent the\ndifferences in density between the 0's and 1's in the Prouhet-Thue-Morse\nsequence.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Prouhet-Thue-Morse constant, accurate to 20 decimal places.\n\n        pass\n    \n---\n### `golomb_dickman_constant(self):`\n\nThe Golomb-Dickman constant represents the limiting distribution of the ratio of the k-th smallest\nnumber in a sample of n random numbers to n^(1/k) as n approaches infinity. It is denoted by G.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Golomb-Dickman constant G, approximately 0.6243299885435508.\n\n        return 0.6243299885435508\n\n---\n### `lebesgue_asymptotic_behavior_constant(self):`\n\nThe Lebesgue asymptotic behavior constant describes the average size of the level sets\nof a random walk in d dimensions. It is denoted by L(d).\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Lebesgue asymptotic behavior constant L(3), approximately 3.912023005428146.\n\n        return 3.912023005428146\n\n---\n### `feller_tornier_constant(self):`\n\nThe Feller-Tornier constant is the probability that a random walk on the integers\nreturns to the origin infinitely often. It is denoted by F.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Feller-Tornier constant F, approximately 0.259183.\n\n        return 0.259183\n\n---\n### `base_10_champernowne_constant(self):`\n\nThe Champernowne constant is formed by concatenating the base 10 representations of\nsuccessive integers, and is represented by C_10. \n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the base 10 Champernowne constant C_10, approximately 0.12345678910111213...\n\n---\n### `salem_constant(self):`\n\nThe Salem number is a complex number that is a root of a certain polynomial\nwith integer coefficients. It is denoted by s.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - complex:\n                The value of the Salem constant s, approximately (1+sqrt(2)) * e^(pi*sqrt(2)/4).\n\n        return (1 + 2 ** 0.5) * Algorithm.exp(Constants.pi * 2 ** 0.5 / 4)\n    \n---\n### `khinchins_constant(self):`\n\nThe Khinchin constant is a number that appears in the theory of continued fractions. \nIt is denoted by K.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Khinchin constant K, approximately 2.6854520010653065.\n\n        return 2.6854520010653065\n\n---\n### `levys_constant(self):`\n\nLevy's constant, also known as the Levy–Khinchin constant, is a mathematical constant that arises in the study of \nLevy processes, which are stochastic processes that exhibit properties such as long-range dependence and heavy tails. \nIt is defined as the limit of the average absolute difference between two random variables divided by their \nroot-mean-square difference, as the sample size tends to infinity. The value of Levy's constant is approximately \n1.3303872425, with high precision being 1.33038724246235217434246.\n            \n\u003e ##### **Symbol:**\n\n        - γ or K\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Levy's constant.\n    \n        return 1.330_387_242_462_352_174_342_46\n\n---\n### `levys_constant_two(self):`\n\nCalculate the value of e to the power of Levy's constant.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of e to the power of Levy's constant.\n\n        return Algorithm.exp(self.levys_constant)\n\n---\n### `copeland_erdos_constant(self):`\n\nCopeland-Erdős constant is the smallest number that is not the sum of \ndistinct non-negative integer powers of 2.\n\n\u003e ##### **Symbol:**\n        - C_E\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float\n    \n---\n### `gompertz_constant(self):`\n\nGompertz constant is a mathematical constant named after Benjamin Gompertz,\nit is the limit of the ratio between the life expectancy of a certain age \nand the remaining life expectancy.\n\n\u003e ##### **Symbol:**\n        - γ\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float\n    \n---\n### `de_bruijn_newman_constant(self):`\n\nDe Bruijn–Newman constant is the limit of the sequence of coefficients a_n\nsuch that the entire function f(z) = Π_(n=1)^∞ [(1 - z/a_n) * exp(z/a_n)] has\nno zeros in the complex plane.\n\n\u003e ##### **Symbol:**\n\n        - λ\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float\n\n---\n### `van_der_pauw_constant():`\n\nThe van der Pauw constant is a constant used in measuring resistance of flat samples,\nand is defined as the ratio of the natural logarithm of the quotient of two measured\nresistances to the constant π.\n\n\u003e ##### **Symbol:**\n\n        - K\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the van der Pauw constant to the highest precision.\n\n        return Algorithm.exp(Constants.pi * MathFunctions.copysign(1, MathFunctions.acos(1/Constants.pi)))\n\n---\n### `magic_angle(self):`\n\nMagic angle is an angle of rotation for the bilayer graphene where the\nelectronic properties of the material exhibit a number of interesting\nphenomena.\n\n\u003e ##### **Symbol:**\n\n        - θ\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The magic angle in radians.\n\n        return Constants.arctan(Algorithm.square_root(3))\n\n\n---\n### `arctan(x):\n\nCalculates the arctangent of x using a Taylor series approximation.\n\n\u003e ##### **Arguments:**\n        - x (float): A real number.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The arctangent of x in radians.\n\n\n---\n### `artins_constant(self):`\n\nThe Artin's constant is a number that appears in the formula to calculate the Artin-Mazur zeta function.\nIt is defined as the infinite product of (1 - p^(-s)) where p ranges over all prime numbers and s is the reciprocal\nof the prime number.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Artin's constant to the highest precision.\n\n---\n### `porters_constant(self):`\n\nPorter's constant is a mathematical constant that appears in the field of information theory. It is defined as\nthe limit of the ratio of the maximum number of different words of length n over the number of possible words of\nlength n as n approaches infinity.\n\n\u003e ##### **Symbol:**\n\n        -\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Porter's constant to the highest precision.\n\n        return Algorithm.exp**(1/Constants.euler_mascheroni_constant)\n\n---\n### `euler_mascheroni_constant(self):`\n\nReturns the Euler-Mascheroni constant, a mathematical constant that appears in many areas of mathematics.\nIt is defined as the limit of the difference between the harmonic series and the natural logarithm of n as n approaches infinity.\n        \nThe function calculates the value of the Euler-Mascheroni constant using a sum of the harmonic series and the natural logarithm of n.\nThe sum is taken over a large number of terms to achieve a high degree of accuracy.\n        \nNote that the function uses the 'math' module to calculate the natural logarithm, so it must be imported before the function can be called.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Euler-Mascheroni constant to a high degree of accuracy.\n\n---\n### `lochs_constant(self):`\n\nLochs' constant is a mathematical constant defined as the limiting ratio of the perimeter of an inscribed regular\ndecagon to its diameter.\n\n\u003e ##### **Symbol:**\n\n        - \n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Lochs' constant to the highest precision.\n\n        return Algorithm.square_root(2 + Algorithm.square_root(2 + Algorithm.square_root(2 + Algorithm.square_root(2 + Algorithm.square_root(2)))))\n\n\n---\n### `deviccis_tesseract_constant(self):`\n\nThe De Vries - De Vos - Barendrecht - De Klerk - Smit - Smit constant (also known as De Vries' tesseract constant)\nis defined as the number that describes the maximum ratio of the content of a hypercube inscribed in a tesseract to\nthe content of the hypercube circumscribed about the tesseract.\n\n\u003e ##### **Symbol:**\n\n        -\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of De Vries' tesseract constant to the highest precision.\n\n        return Algorithm.square_root(2 + Algorithm.square_root(2)) / (2 * Algorithm.square_root(2))\n\n\n---\n### `liebs_square_ice_constant(self):`\n\nThe Lieb's square ice constant is the infinite sum of alternating sign reciprocals of the squares of odd positive integers.\nIt appears in the square ice problem in statistical mechanics.\n\n\u003e ##### **Symbol:**\n\n        - \n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Lieb's square ice constant to the highest precision.\n\n        return Constants.pi / (Algorithm.square_root(3) * Algorithm.log((3 + Algorithm.square_root(8)) / 2))\n\n---\n### `nivens_constant(self):`\n\nNiven's constant is a mathematical constant that is the only known integer x that is divisible by the sum of its digits\nwhen written in decimal base. The constant is also related to the convergence of certain infinite series.\n\n\u003e ##### **Symbol:**\n\n        - \n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - int:\n                The value of Niven's constant to the highest precision.\n    \n---\n### `mills_constant(self):`\n\nMills constant is the smallest positive real number A such that the \nfloor function of the double exponential function is a prime number,\nwhere the double exponential function is f(n) = A^(3^n).\n\n\u003e ##### **Symbol:**\n\n        - A\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float\n\n---\n### `stephens_constant(self):`\n\nStephens' constant is a mathematical constant that arises in the study of prime numbers.\n\n\u003e ##### **Returns:**\n            \n        - float:\n                The value of Stephens' constant.\n\n        return 0.5364798721\n\n---\n### `regular_paperfolding_sequence(self):`\n\nThe regular paperfolding sequence is a binary sequence that arises in the study of fractal geometry.\n\n\u003e ##### **Returns:**\n\n        - str:\n                The regular paperfolding sequence as a string of 0s and 1s.\n\n        return \"110110011100100\"\n\n---\n### `reciprocal_fibonacci_constant(self):`\n\nThe reciprocal Fibonacci constant is a real number that arises in the study of Fibonacci numbers.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the reciprocal Fibonacci constant.\n\n        return 1.1319882488\n    \n---\n### `chvatal_sankoff_constant(self):`\n\nChvátal–Sankoff constant for the binary alphabet.\n\n\u003e ##### **Symbol:**\n\n        - \\gamma_{2}\n\n\u003e ##### **Returns:**\n            \n        - float:\n                The value of the Chvátal–Sankoff constant.\n\n        return 1.7550327129\n    \n---\n### `Feigenbaum_constant(self):`\n\nFeigenbaum constant δ\n\n\u003e ##### **Symbol:**\n\n        - \\delta\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Feigenbaum constant.\n\n        return 4.6692016091\n    \n---\n### `chaitins_constant(self):`\n\nChaitin's constant is a real number that encodes the halting probability of a universal Turing machine.\n\n\u003e ##### **Symbol:**\n            \n        - \\Omega\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the computation of the constant fails.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Chaitin's constant.\n    \n---\n### `robbins_constant(self):`\n\nRobbins' constant is a mathematical constant that arises in the study of mathematical analysis.\n\n\u003e ##### **Symbol:**\n        \n        - \\Delta (3)\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the computation of the constant fails.\n\n\u003e ##### **Arguments:**\n\n        - none\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Robbins' constant.\n    \n---\n### `weierstrass_constant(self):`\n\nWeierstrass' constant is a mathematical constant that arises in the study of elliptic functions.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of Weierstrass' constant.\n\n        return 0.5174790617\n    \n---\n### `fransen_robinson_constant(self):`\n\nReturns Fransen-Robinson constant which is the smallest positive root of the following polynomial equation:\n        \nx^3 - x^2 - 1 = 0\n        \n\u003e ##### **Symbol:**\n\n        - F\n        \n\u003e ##### **Raises:**\n            \n        - ValueError:\n                If the root cannot be found\n        \n\u003e ##### **Returns:**\n\n        - float:\n                The Fransen-Robinson constant\n    \n---\n### `feigenbaum_constant(self):`\n\nReturns Feigenbaum constant alpha which relates to the period-doubling bifurcation in chaotic systems.\n\n\u003e ##### **Symbol:**\n\n        - \\alpha \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the constant cannot be computed\n\n\u003e ##### **Returns:**\n            \n        - float:\n                The Feigenbaum constant alpha\n    \n---\n### `second_du_bois_reymond_constant(self):`\n\nReturns the Second du Bois-Reymond constant, which is defined as the supremum of the absolute values of the Fourier coefficients of a bounded variation function with period 1.\n\n\u003e ##### **Symbol:**\n            \n        - C_{2}\n            \n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the constant cannot be computed\n\n\u003e ##### **Returns:**\n\n        - float:\n                The Second du Bois-Reymond constant\n    \n---\n### `erdos_tenenbaum_ford_constant(self):`\n\nReturns the Erdős–Tenenbaum–Ford constant which is related to the distribution of prime numbers.\n\n\u003e ##### **Symbol:**\n            \n        - \\delta\n            \n\u003e ##### **Raises:**\n            \n        - ValueError:\n                If the constant cannot be computed\n\n\u003e ##### **Returns:**\n            \n        - float:\n                The Erdős–Tenenbaum–Ford constant\n    \n---\n### `conways_constant(Self):`\n\nReturns Conway's constant, which is the unique real root of the following polynomial equation:\n\nx^3 - x - 1 = 0\n\n\u003e ##### **Symbol:**\n\n        - \\lambda\n            \n\u003e ##### **Arguments:**\n            \n        - Self (object): The class instance\n\n\u003e ##### **Raises:**\n            \n        - ValueError:\n                If the root cannot be found\n\n\u003e ##### **Returns:**\n            \n        - float:\n                Conway's constant\n    \n---\n### `backhouses_constant(self):`\n\nReturns Backhouse's constant which is defined as the smallest k such that the inequality n! \u003e k^n holds for all positive integers n.\n\n\n\u003e ##### **Symbol:**\n\n        - B\n            \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the constant cannot be computed\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                Backhouse's constant\n\n---\n### `viswanath_constant(self):`\n\nReturns Viswanath's constant, which is the limiting distribution of the ratios of successive gaps in the sequence of zeros of the Riemann zeta function.\n\n\n\u003e ##### **Symbol:**\n\n        - \\Omega_V\n            \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the constant cannot be computed\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                Viswanath's constant\n\n---\n### `komornik_loreti_constant(self):`\n\nReturns Komornik-Loreti constant, which is the unique positive real root of the following polynomial equation:\n\n        x^2 - x - 1 = 0\n\n\n\u003e ##### **Symbol:**\n\n        - q\n            \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the root cannot be found\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                Komornik-Loreti constant\n    \n---\n### `embree_trefethen_constant(self):`\n\nComputes the Embree-Trefethen constant, which is defined as the supremum of the real parts\nof the poles of a certain rational function.\n\n\n\u003e ##### **Symbol:**\n\n        - {\\displaystyle \\beta ^{\\star }}\n\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the computation fails to converge.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The computed value of the Embree-Trefethen constant.\n\n\u003e ##### **References:**\n\n        - * Embree, M., \u0026 Trefethen, L. N. (1999). Growth and decay of random plane waves. \n        - Communications on Pure and Applied Mathematics, 52(7), 757-788.\n        - * Trefethen, L. N. (2006). Spectral methods in MATLAB. SIAM.\n    \n---\n### `heath_brown_moroz_constant(self):`\n\nComputes the Heath-Brown-Moroz constant, which is defined as the product of the Euler-Mascheroni \nconstant and the reciprocal of a certain infinite product.\n\n\n\u003e ##### **Symbol:**\n\n        - C\n\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the computation fails to converge.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The computed value of the Heath-Brown-Moroz constant.\n\n\u003e ##### **References:**\n\n        - * Heath-Brown, D. R. (1984). The fourth power moment of the Riemann zeta-function. \n        - Proceedings of the London Mathematical Society, 49(2), 475-513.\n        - * Moroz, B. Z. (2001). Some constants associated with the Riemann zeta function. \n        - Journal of Mathematical Analysis and Applications, 261(1), 235-251.\n    \n---\n### `mrb_constant():`\n\nComputes the MRB constant, which is defined as the sum of the alternating series obtained by \nraising the first n positive integers to their own powers and then summing them with alternating signs.\n\n\n\u003e ##### **Symbol:**\n\n        - S\n\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the computation fails to converge.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The computed value of the MRB constant.\n\n\u003e ##### **References:**\n\n        - * Borwein, J. M., Bradley, D. M., \u0026 Crandall, R. E. (1999). Computational strategies for \n        - the Riemann zeta function. Journal of Computational and Applied Mathematics, 121(1-2), 247-296.\n        - * Bradley, D. M. (2004). Multiple q-zeta values. Ramanujan Journal, 8(1), 39-65.\n\n---\n### `prime_constant():`\n\nComputes the Prime constant, which is defined as the product of the reciprocals of the primes \nminus ln(ln(2)).\n\n\u003e ##### **Symbol:**\n\n        - \\rho \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the computation fails to converge.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The computed value of the Prime constant.\n\n\u003e ##### **References:**\n\n        - * Meissel, L. (1879). Bestimmung einer zahl, welche zu der logaritmierten primzahlfunction \n        - π(x) in näherung den nämlichen wert wie die zahl x selbst gibt. \n        - Journal für die Reine und Angewandte Mathematik, 1879(88), 127-133.\n        - * Lehmer, D. H. (1959). List of computed values of the prime-counting function π(x) \n        - from x= 10^6 to x= 10^20. U. S. National Bureau of Standards Applied Mathematics Series, 46.\n\n---\n### `somos_quadratic_recurrence_constant():`\n\nReturns the Somos quadratic recurrence constant.\n\n\n\u003e ##### **Symbol:**\n\n        - \\sigma\n                \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the calculation is not valid.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Somos quadratic recurrence constant.\n\n---\n### `foias_constant(self):`\n\nReturns the Foias constant.\n\n\n\u003e ##### **Symbol:**\n\n        - \\alpha\n            \n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the calculation is not valid.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Foias constant.\n\n---\n### `logarithmic_capacity(self):`\n\nReturns the logarithmic capacity of the unit disk.\n\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the calculation is not valid.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the logarithmic capacity.\n\n        return 2\n\n---\n### `taniguchi_constant(self):`\n\nReturns the Taniguchi constant.\n\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the calculation is not valid.\n\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the Taniguchi constant.\n\n---\n## **Functions Class**\n\nA class containing various mathematical functions.\n\n### `gamma(self, x):`\n\nCompute the value of the gamma function at the given value of x.\n\n        - Args:\n            x (float): The value at which the gamma function is to be evaluated.\n\n\u003e ##### **Returns:**\n        \n        - float:    \n                The value of the gamma function at the given value of x.\n\n\u003e ##### **Raises:**\n        \n        - ValueError:\n                If x is negative and not an integer.\n\n\u003e ##### **Notes:**\n\n        - The gamma function is defined as the integral from zero to infinity of t^(x-1) * exp(-t) dt.\n        - For positive integers, the gamma function can be computed recursively as (n-1)!.\n        - For x \u003c= 0, the gamma function is undefined, but we return NaN to avoid raising an error.\n\n### `area_of_circle(self, r: float) -\u003e float:`\n\nCalculates the area of a circle given its radius.\n\n\u003e ##### **Arguments:**\n\n        - r:\n                The radius of the circle.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The area of the circle.\n        \n        return 3.141592653589793238 * r ** 2\n\n---\n### `volume_of_sphere(self, r: float) -\u003e float:`\n\nCalculates the volume of a sphere given its radius.\n\n\u003e ##### **Arguments:**\n\n        - r:\n                The radius of the sphere.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The volume of the sphere.\n        \n        return 4 / 3 * 3.141592653589793238 * r ** 3\n\n---\n### `perimeter_of_rectangle(self, l: float, b: float) -\u003e float:`\n\nCalculates the perimeter of a rectangle given its length and breadth.\n\n\u003e ##### **Arguments:**\n\n        - l:\n                The length of the rectangle.\n\n        - b:\n                The breadth of the rectangle.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The perimeter of the rectangle.\n        \n        return 2 * (l + b)\n\n---\n### `pythagoras_theorem_length(self, a: float, b: float) -\u003e float:`\n\nCalculates the length of the hypotenuse of a right-angled triangle given the lengths of its two other sides.\n\n\u003e ##### **Arguments:**\n\n        - a:\n                The length of one of the sides of the triangle.\n        \n        - b:\n                The length of the other side of the triangle.\n\n\u003e ##### **Returns:**\n\n        The length of the hypotenuse of the triangle.\n        return (a ** 2 + b ** 2) ** 0.5\n\n---\n### `square_root(self, x: float) -\u003e float:`\n\nCalculates the square root of a given number.\n\n\u003e ##### **Arguments:**\n\n        - x:\n                The number to take the square root of.\n\n\u003e ##### **Returns:**\n\n        The square root of x.\n        return x ** 0.5\n\n---\n### `factorial(self, n: int) -\u003e int:`\n\nCalculates the factorial of a given number.\n\n\u003e ##### **Arguments:**\n\n        - n:\n                The number to calculate the factorial of.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The factorial of n.\n\n        fact = 1\n        for i in range(1, n+1):\n            fact *= i\n        return fact\n\n---\n### `gcd(self, a: int, b: int) -\u003e int:`\n\nCalculates the greatest common divisor of two numbers.\n\n\u003e ##### **Arguments:**\n\n        - a:\n                The first number.\n        \n        - b:\n                The second number.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The greatest common divisor of a and b.\n        \n        while(b):\n            a, b = b, a % b\n        return a\n\n---\n### `lcm(self, a: int, b: int) -\u003e int:`\n\nCalculates the least common multiple of two numbers.\n\n\u003e ##### **Arguments:**\n\n        - a:\n                The first number.\n        \n        - b:\n                The second number.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The least common multiple of a and b.\n\n        return a * b // self.gcd(a, b)\n\n---\n### `exponential(self, x: float) -\u003e float:`\n\nCalculates the value of e raised to a given power.\n\n\u003e ##### **Arguments:**\n\n        - x:\n                The exponent.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of e raised to x.\n\n        e = 2.718281828459045235\n        return e ** x\n\n---\n### `logarithm(self, x: float, base: float) -\u003e float:`\n\nCalculates the logarithm of a given number to a given base.\n\n\u003e ##### **Arguments:**\n\n        - x:\n                The number to take the logarithm of.\n        \n        - base:\n                The base of the logarithm.\n\n\u003e ##### **Returns:**\n\n        The logarithm of x to the base.\n\n        return (Functions.log(x) / Functions.log(base))\n\n---\n### `log(x):`\n\nCalculates the natural logarithm of a given number.\n\n\u003e ##### **Arguments:**\n\n        x: The number to take the natural logarithm of.\n\n\u003e ##### **Returns:**\n\n        The natural logarithm of x.\n\n        if x \u003c= 0:\n        return float('nan')\n        elif x == 1:\n        return 0.0\n        else:\n        return Functions.integrate(1/x, 1, x)\n\n---\n### `integrate(f, a, b):`\n\nApproximates the definite integral of a function over a given interval using the trapezoidal rule.\n\n\u003e ##### **Arguments:**\n\n        - f:\n                The function to integrate.\n        \n        - a:\n                The lower limit of the interval.\n        \n        - b:\n                The upper limit of the interval.\n\n\u003e ##### **Returns:**\n\n        The approximate value of the definite integral of f over the interval [a, b].\n\n        n = 1000 # Number of trapezoids to use\n        dx = (b - a) / n\n        x_values = [a + i * dx for i in range(n+1)]\n        y_values = [f(x) for x in x_values]\n        return (dx/2) * (y_values[0] + y_values[-1] + 2*sum(y_values[1:-1]))\n\n---\n### `surface_area_of_cylinder(self, r: float, h: float) -\u003e float:`\n\nCalculates the surface area of a cylinder given its radius and height.\n\n\u003e ##### **Arguments:**\n\n        - r:\n                The radius of the cylinder.\n        \n        - h:\n                The height of the cylinder.\n\n\u003e ##### **Returns:**\n\n        The surface area of the cylinder.\n\n        return 2 * 3.14159265358979323846 * r * (r + h)\n\n---\n### `volume_of_cylinder(self, r: float, h: float) -\u003e float:`\n\nCalculates the volume of a cylinder given its radius and height.\n\n\u003e ##### **Arguments:**\n\n        - r:\n                The radius of the cylinder.\n        - h:\n                The height of the cylinder.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The volume of the cylinder.\n\n        return 3.14159265358979323846 * r ** 2 * h\n\n---\n### `area_of_triangle(self, b: float, h: float) -\u003e float:`\n\nCalculates the area of a triangle given its base and height.\n\n\u003e ##### **Arguments:**\n\n        - b:\n                The base of the triangle.\n\n        - h:\n                The height of the triangle.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The area of the triangle.\n\n        return 0.5 * b * h\n\n---\n### `sine(self, x: float) -\u003e float:`\n\nCalculates the sine of a given angle in radians.\n\n\u003e ##### **Arguments:**\n\n        - x: The angle in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The sine of the angle.\n\n        x = x % (2 * 3.141592653589793238)\n        sign = 1 if x \u003e 0 else -1\n        x *= sign\n        if x \u003e 3.141592653589793238:\n            x -= 2 * 3.141592653589793238\n            sign *= -1\n        return sign * (\n            x - x ** 3 / 6 + x ** 5 / 120 - x ** 7 / 5040 + x ** 9 / 362880\n        )\n        \n### `copysign(self, x, y):`\n\nReturn a float with the magnitude of x and the sign of y.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The magnitude of the result.\n        \n        - y (float):\n                The sign of the result.\n\n\u003e ##### **Returns:**\n\n        - float\n                A float with the magnitude of x and the sign of y.\n\n\n---\n\n### `acos(self, x):`\n\nReturn the arc cosine of x, in radians.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The value whose arc cosine is to be returned.\n\n\u003e ##### **Returns:**\n\n        - float\n                The arc cosine of x, in radians.\n---\n### `quad(func, a, b, eps=1e-7, maxiter=50):`\n\nApproximates the definite integral of a function using the adaptive quadrature method.\n\n\u003e ##### **Parameters:**\n\n        func (callable): A function to integrate.\n        a (float): Lower limit of integration.\n        b (float): Upper limit of integration.\n        eps (float): Desired accuracy.\n        maxiter (int): Maximum number of iterations.\n\n\u003e ##### **Returns:**\n\n        float: The definite integral of the function over the interval [a, b].\n\n    adaptivesimpson(a, b, eps, fa, fb, fc, level):\n        c = (a + b) / 2\n        h = b - a\n        d = (a + c) / 2\n        e = (c + b) / 2\n        fd = func(d)\n        fe = func(e)\n        Sleft = h * (fa + 4 * fd + fc) / 6\n        Sright = h * (fc + 4 * fe + fb) / 6\n        S2 = Sleft + Sright\n        if level \u003e= maxiter or abs(S2 - Sleft - Sright) \u003c= 15 * eps:\n            return S2 + (S2 - Sleft - Sright) / 15\n        return adaptivesimpson(a, c, eps / 2, fa, fc, fd, level + 1) + adaptivesimpson(c, b, eps / 2, fc, fb, fe, level + 1)\n\n        fa = func(a)\n        fb = func(b)\n        fc = func((a + b) / 2)\n        return adaptivesimpson(a, b, eps, fa, fb, fc, 0)\n    \n---\n### `subsets(s):`\n\nGenerates all possible non-empty subsets of a given iterable.\n        \n\u003e ##### **Parameters:**\n\n        s (iterable): The iterable for which subsets are generated.\n\n\u003e ##### **Returns:**\n\n        generator: A generator that yields each subset as a tuple.\n\n        s = list(s)\n        n = len(s)\n        for i in range(1, 2**n):\n            subset = tuple(s[j] for j in range(n) if (i \u003e\u003e j) \u0026 1)\n            yield subset\n\n---\n### `limit(func, x0, h=1e-8, max_iterations=1000, tol=1e-8):`\n\nApproximates the limit of a function f(x) as x approaches x0.\n\n\u003e ##### **Arguments:**\n\n        func (function): A function of one variable.\n        x0 (float): The value of x that x approaches.\n        h (float, optional): Step size for computing the numerical derivative. Defaults to 1e-8.\n        max_iterations (int, optional): Maximum number of iterations for the numerical approximation. Defaults to 1000.\n        tol (float, optional): Tolerance level for stopping iterations. Defaults to 1e-8.\n\n\u003e ##### **Returns:**\n\n        float: The numerical approximation of the limit.\n\n        f = func\n        x = x0\n        for i in range(max_iterations):\n            f_x = f(x)\n            f_x_plus_h = f(x + h)\n            derivative = (f_x_plus_h - f_x) / h\n            x -= f_x / derivative\n            if abs(f(x)) \u003c tol:\n                return f(x)\n        raise ValueError(f\"Failed to converge to a limit within {max_iterations} iterations.\")\n\n---\n### `floor(x):`\n\n        Returns the greatest integer less than or equal to x.\n\n\u003e ##### **Arguments:**\n\n        x (float): A floating-point number.\n        \n\u003e ##### **Returns:**\n        int: The greatest integer less than or equal to x.\n\n        return int(x) if x \u003e= 0 else int(x) - 1\n\n### `brentq(f, a, b, maxiter=100):`\nFind a root of a function in the interval [a, b] using Brent's method.\n        \n\u003e ##### **Arguments:**\n        f (callable): The function to find the root of.\n        a (float): The left endpoint of the interval.\n        b (float): The right endpoint of the interval.\n        maxiter (int, optional): The maximum number of iterations to perform. Defaults to 100.\n            \n\u003e ##### **Returns:**\n        float: The root of the function.\n            \n\u003e ##### **Raises:**\n        ValueError: If the root cannot be found within the maximum number of iterations.\n\n---\n## **Sequences class:**\n    \n---\n### `harmonic_number(self, n: int) -\u003e float:`\n\nThe nth harmonic number is the sum of the reciprocals of the first n natural numbers.\n\n\u003e ##### **Symbol:**\n\n        - H_n\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The number of terms to include in the sum.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the nth harmonic number.\n\n        return sum(1/i for i in range(1, n+1))\n    \n---\n### `gregory_coefficients(self, n: int) -\u003e float:`\n\nThe nth Gregory coefficient is a coefficient used in the Gregory series formula for pi,\nwhich provides an approximate value of pi.\n\n\u003e ##### **Symbol:**\n\n        - G_n\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The index of the Gregory coefficient to be calculated.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the nth Gregory coefficient.\n\n        if n == 0:\n                return 1\n        elif n % 2 == 0:\n                return 0\n        else:\n                return -2 / (n * Constants.pi) * self.gregory_coefficients(n-1)\n    \n---\n### `bernoulli_number(self, n: int) -\u003e float:`\n\nThe nth Bernoulli number is a sequence of rational numbers with deep connections to number theory\nand other areas of mathematics, including algebra and calculus.\n\n\u003e ##### **Symbol:**\n\n        - B_n\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The index of the Bernoulli number to be calculated.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the nth Bernoulli number.\n\n        if n == 0:\n                return 1\n        elif n == 1:\n                return -0.5\n        else:\n                sum_term = sum(MathFunctions.combination(n+1, k) * self.bernoulli_number(k) / (n+1-k) for k in range(1, n))\n        return 1 - sum_term\n    \n---\n### `hermite_constants(self, n: int) -\u003e float:`\n\nThe nth Hermite constant is a constant that appears in the study of the quantum harmonic oscillator,\nand is related to the normalization of the wave functions of the oscillator.\n\n\u003e ##### **Symbol:**\n\n        - H_n\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The index of the Hermite constant to be calculated.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the nth Hermite constant.\n\n        if n == 0:\n                return 1\n        else:\n                return (-1)**n * Algorithm.factorial(n-1)\n    \n---\n### `hafner_sarnak_mccurley_constant(self, n: int) -\u003e float:`\n\nThe nth Hafner-Sarnak-McCurley constant is a constant that appears in the study of prime numbers\nand related topics in number theory.\n\n\u003e ##### **Symbol:**\n\n        - C_n\n\n\u003e ##### **Arguments:**\n\n        - n (int):\n                The index of the Hafner-Sarnak-McCurley constant to be calculated.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The value of the nth Hafner-Sarnak-McCurley constant.\n\n        return sum(Algorithm.exp(-n/p)/p for p in Algorithm.sieve_of_eratosthenes(2*n+1))\n    \n    \n---\n### `stieltjes_constants(self, n: int) -\u003e float:`\n\nReturns the nth Stieltjes constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth Stieltjes constant.\n            \n        if n == 1:\n                return 0.57721566490153286060651209  # gamma\n        elif n == 2:\n                return 1.20205690315959428539973816  # G\n        elif n == 3:\n                return 1.79175946922805500081247735  # pi^2/6\n        elif n == 4:\n                return 2.9456101084887218059356      # 7*G - 4*pi^2/3\n        elif n == 5:\n                return 4.4428829381583661417149      # 3*zeta(3) - 2*G\n        else:\n                raise ValueError(\"The index n should be between 1 and 5.\")\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/StieltjesConstants.html\n            \n---\n### `favard_constants(self, n: int) -\u003e float:`\n\nReturns the nth Favard constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth Favard constant.\n\n        if n \u003c 1:\n                raise ValueError(\"The index n should be a positive integer.\")\n        elif n == 1:\n                return 1\n        else:\n                return sum([Sequences.favard_constants(self, i) * Sequences.favard_constants(self, n-i) / (i+n-i-1) \n                            for i in range(1, n)])\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/FavardConstants.html\n        \n        \n---\n### `generalized_bruns_constant(self, n: int) -\u003e float:`\n\nReturns the nth generalized Bruns constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth generalized Bruns constant.\n\n        if n \u003c 1:\n                raise ValueError(\"The index n should be a positive integer.\")\n        elif n == 1:\n                return 1\n        else:\n                return sum([abs(Sequences.generalized_bruns_constant(self, i) - Sequences.generalized_bruns_constant(self, i-1)) \n                            for i in range(2, n+1)]) + 1\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/GeneralizedBrunsConstant.html\n        \n---\n### `champernowne_constants(self, n: int) -\u003e float:`\n\nReturns the nth Champernowne constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth Champernowne constant.\n\n        if n \u003c 1:\n                raise ValueError(\"n should be a positive integer\")\n        if n == 1:\n        return 0.12345678910111213141516171819202122\n        else:\n                prev = self.champernowne_constants(n-1)\n        return float(str(prev) + str(n+8))\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/ChampernowneConstant.html\n\n\n---\n### `lagrange_number(self, n: int) -\u003e int:`\n\nReturns the nth Lagrange number.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - int:\n                the nth Lagrange number.\n\n        if n \u003c 1:\n                raise ValueError(\"n should be a positive integer\")\n        if n == 1:\n                return 1\n        else:\n                return n * self.lagrange_number(n-1) - (-1)**n\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/LagrangeNumber.html\n    \n---\n### `fellers_coin_tossing_constants(self, n: int) -\u003e float:`\n\nReturns the nth Feller's coin-tossing constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth Feller's coin-tossing constant.\n\n        result = 0\n        for k in range(n + 1):\n                result += (-1) ** k / (2 ** (2 ** k))\n        return result\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/FellersCoin-TossingConstants.html\n    \n---\n### `stoneham_number(self, n: int) -\u003e int:`\n\nReturns the nth Stoneham number.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - int:\n                the nth Stoneham number.\n            \n        if n == 0:\n                return 1\n        else:\n                return (3 * Sequences.stoneham_number(n - 1) + 1) // 2\n\n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/StonehamNumber.html\n    \n---\n### `beraha_constants(self, n: int) -\u003e float:`\n\nReturns the nth Beraha constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth Beraha constant.\n\n        if n == 0:\n                return 1\n        else:\n                return 1 + 1 / Sequences.beraha_constants(n - 1)\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/BerahasConstant.html\n    \n---\n### `chvatal_sankoff_constants(self, n: int) -\u003e float:`\n\nReturns the nth Chvátal-Sankoff constant.\n        \n\u003e ##### **Arguments:**\n\n        - n (int):\n                the index of the sequence.\n            \n\u003e ##### **Returns:**\n\n        - float:\n                the nth Chvátal-Sankoff constant.\n\n        result = 0\n        for k in range(n + 1):\n                binom = MathFunctions.comb(2 ** k, k)\n                result += (-1) ** k * binom ** 2\n        return result\n            \n\u003e ##### **Reference:**\n\n        - https://mathworld.wolfram.com/Chvatal-SankoffConstants.html\n    \n---\n### `hyperharmonic_number(self, n: int, p: int) -\u003e float:`\n\nComputes the hyperharmonic number H(n,p), which is defined as the sum of the p-th powers of the reciprocals of\nthe first n positive integers.\n        \n\u003e ##### **Arguments:**\n\n        - n - (int):\n                The positive integer up to which to compute the sum.\n\n        - p (int):\n                The exponent to which to raise the reciprocals of the integers.\n        \n\u003e ##### **Returns:**\n\n        - H -\n                (float): The hyperharmonic number H(n,p).\n\n        H = 0\n        for i in range(1, n+1):\n            H += 1 / i ** p\n        return H\n        \n\u003e ##### **Symbols:**\n\n        - H(n,p):\n                hyperharmonic number of order p and degree n.\n\n---\n### `gregory_number(self, n: int) -\u003e float:`\n\nComputes the nth Gregory number, which is defined as the alternating sum of the reciprocals of the odd\npositive integers, up to the nth term.\n        \n\u003e ##### **Arguments:**\n\n        - n - (int):\n                The positive integer up to which to compute the alternating sum.\n        \n\u003e ##### **Returns:**\n\n        - G - (float):\n                The nth Gregory number.\n\n        G = 0\n        for i in range(1, n+1):\n            if i % 2 == 1:\n                G += 1 / i\n            else:\n                G -= 1 / i\n        return G\n        \n\u003e ##### **Symbols:**\n\n        - G(n):\n                nth Gregory number.\n\n\n---\n### `metallic_mean(self, x: float) -\u003e float:`\n\nComputes the value of the metallic mean of x, which is the positive solution to the equation x = 1/(1+x).\n        \n\u003e ##### **Arguments:**\n\n        - x(float):\n                The value for which to compute the metallic mean.\n        \n\u003e ##### **Returns:**\n\n        - mm\n                (float): The value of the metallic mean of x.\n\n        mm = (1 + Algorithm.square_root(1 + 4*x)) / 2\n        return mm\n        \n\u003e ##### **Symbols:**\n\n        - mm(x):\n                metallic mean of x.\n\n---\n## **HyperbolicFunctions class:**\n\nA class representing the six hyperbolic functions: sinh, cosh, tanh, coth, sech, and csch.\n\n\u003e ##### **References:**\n\n        - * Weisstein, E. W. (n.d.). Hyperbolic functions. MathWorld--A Wolfram Web Resource.\n        - Retrieved October 11, 2021, from https://mathworld.wolfram.com/HyperbolicFunctions.html\n\n---\n### `sinh(x):`\n\nReturns the hyperbolic sine of x.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The input value in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The hyperbolic sine of x.\n\n        return (Algorithm.exp(x) - Algorithm.exp(-x)) / 2\n\n---\n### `cosh(x):`\n\nReturns the hyperbolic cosine of x.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The input value in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The hyperbolic cosine of x.\n\n        return (Algorithm.exp(x) + Algorithm.exp(-x)) / 2\n\n---\n### `tanh(x):`\n\nReturns the hyperbolic tangent of x.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The input value in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The hyperbolic tangent of x.\n\n        return HyperbolicFunctions.sinh(x) / HyperbolicFunctions.cosh(x)\n\n---\n### `coth(x):`\n\nReturns the hyperbolic cotangent of x.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The input value in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The hyperbolic cotangent of x.\n\n        return 1 / HyperbolicFunctions.tanh(x)\n\n---\n### `sech(x):`\n\nReturns the hyperbolic secant of x.\n\n\u003e ##### **Arguments:**\n\n        - x (float):\n                The input value in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The hyperbolic secant of x.\n\n        return 1 / HyperbolicFunctions.cosh(x)\n\n---\n### `csch(x):`\n\nReturns the hyperbolic cosecant of x.\n\n\u003e ##### **Arguments:**\n\n        - x(float):\n                The input value in radians.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The hyperbolic cosecant of x.\n\n        return 1 / HyperbolicFunctions.sinh(x)\n\n\n---\n## **ComplexNumber class:**\n\nA class representing a complex number.\n\n\u003e ##### **Attributes:**\n\n        - real (float): The real part of the complex number.\n\n        - imag (float): The imaginary part of the complex number.\n\n---\n### `__init__(self, real=0, imag=0):`\n\nInitializes a complex number.\n\n\u003e ##### **Arguments:**\n\n        - real (float): The real part of the complex number.\n\n        - imag (float): The imaginary part of the complex number.\n\n---\n### `__repr__(self):`\n\nReturns a string representation of the complex number.\n\n\u003e ##### **Returns:**\n\n        - str:\n                A string representation of the complex number.\n\n        return f\"{self.real} + {self.imag}j\"\n\n---\n### `__add__(self, other):`\n\nAdds two complex numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (ComplexNumber): The complex number to add.\n\n\u003e ##### **Returns:**\n\n        - ComplexNumber: The sum of the two complex numbers.\n\n        return ComplexNumber(self.real + other.real, self.imag + other.imag)\n\n---\n### `__sub__(self, other):`\n\nSubtracts two complex numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (ComplexNumber): The complex number to subtract.\n\n\u003e ##### **Returns:**\n\n        - ComplexNumber: The difference of the two complex numbers.\n\n        return ComplexNumber(self.real - other.real, self.imag - other.imag)\n\n---\n### `__mul__(self, other):`\n\nMultiplies two complex numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (ComplexNumber): The complex number to multiply.\n\n\u003e ##### **Returns:**\n\n        - ComplexNumber: The product of the two complex numbers.\n\n        real = self.real * other.real - self.imag * other.imag\n        imag = self.real * other.imag + self.imag * other.real\n        return ComplexNumber(real, imag)\n\n---\n### `__truediv__(self, other):`\n\nDivides two complex numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (ComplexNumber): The complex number to divide.\n\n\u003e ##### **Returns:**\n\n        - ComplexNumber: The quotient of the two complex numbers.\n\n        denom = other.real**2 + other.imag**2\n        real = (self.real * other.real + self.imag * other.imag) / denom\n        imag = (self.imag * other.real - self.real * other.imag) / denom\n        return ComplexNumber(real, imag)\n\n---\n### `conjugate(self):`\n\nComputes the conjugate of the complex number.\n\n\u003e ##### **Returns:**\n\n        - ComplexNumber: The conjugate of the complex number.\n\n        return ComplexNumber(self.real, -self.imag)\n\n---\n### `modulus(self):`\n\nComputes the modulus (magnitude) of the complex number.\n\n\u003e ##### **Returns:**\n\n        - float:\n                The modulus of the complex number.\n\n        return (self.real**2 + self.imag**2)**0.5\n\n\n---\n## **RealNumber class:**\n\nA class representing a real number.\n    \n---\n### `__init__(self, value):`\n\nInitializes a new RealNumber object with the given value.\n\n\u003e ##### **Parameters:**\n\n        - value (float):\n                The value of the real number.\n\n\u003e ##### **Returns:**\n\n        - RealNumber: \n                A new RealNumber object.\n\n            self.value = value\n\n---\n### `__str__(self):`\n\nReturns a string representation of the real number.\n\n\u003e ##### **Returns:**\n\n        - str:\n                A string representation of the real number.\n\n        return str(self.value)\n\n---\n### `__repr__(self):`\n\nReturns a string representation of the real number.\n\n\u003e ##### **Returns:**\n\n        - str:\n                A string representation of the real number.\n\n        return str(self.value)\n\n---\n### `__eq__(self, other):`\n\nChecks whether the real number is equal to another object.\n\n\u003e ##### **Parameters:**\n\n        - other (object):\n                The object to compare with.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the real number is equal to the other object, False otherwise.\n\n        if isinstance(other, RealNumber):\n                return self.value == other.value\n        elif isinstance(other, float):\n                return self.value == other\n        else:\n                return False\n\n---\n### `__ne__(self, other):`\n\nChecks whether the real number is not equal to another object.\n\n\u003e ##### **Parameters:**\n\n        - other (object):\n                The object to compare with.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the real number is not equal to the other object, False otherwise.\n\n        return not self.__eq__(other)\n\n---\n### `__lt__(self, other):`\n\nChecks whether the real number is less than another object.\n\n\u003e ##### **Parameters:**\n\n        - other (object):\n                The object to compare with.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the real number is less than the other object, False otherwise.\n\n        if isinstance(other, RealNumber):\n                return self.value \u003c other.value\n        elif isinstance(other, float):\n                return self.value \u003c other\n        else:\n                return NotImplemented\n\n---\n### `__le__(self, other):`\n\nChecks whether the real number is less than or equal to another object.\n\n\u003e ##### **Parameters:**\n\n        - other (object):\n                The object to compare with.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the real number is less than or equal to the other object, False otherwise.\n\n        if isinstance(other, RealNumber):\n                return self.value \u003c= other.value\n        elif isinstance(other, float):\n                return self.value \u003c= other\n        else:\n                return NotImplemented\n\n---\n### `__gt__(self, other):`\n\nChecks whether the real number is greater than another object.\n\n\u003e ##### **Parameters:**\n\n        - other (object):\n                The object to compare with.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the real number is greater than the other object, False otherwise.\n\n        if isinstance(other, RealNumber):\n                return self.value \u003e other.value\n        elif isinstance(other, float):\n                return self.value \u003e other\n        else:\n                return NotImplemented\n\n---\n### `__ge__(self, other):`\n\nChecks whether the real number is greater than or equal to another object.\n\n\u003e ##### **Parameters:**\n\n        - other (object):\n                The object to compare with.\n\n\u003e ##### **Returns:**\n\n        - bool:\n                True if the real number is greater than or equal to the other object, False otherwise.\n\n        if isinstance(other, RealNumber):\n                return self.value \u003e= other.value\n        elif isinstance(other, float):\n                return self.value \u003e= other\n        else:\n                return NotImplemented\n        \n---\n### `__add__(self, other):`\n\nAdds two RealNumber objects.\n\n\u003e ##### **Parameters:**\n\n        - other (RealNumber or float):\n                The RealNumber object or float to add.\n\n\u003e ##### **Returns:**\n\n        - RealNumber: \n                A new RealNumber object with the sum of the two numbers.\n\n        if isinstance(other, RealNumber):\n                return RealNumber(self.value + other.value)\n        elif isinstance(other, float):\n                return RealNumber(self.value + other)\n        else:\n                return NotImplemented\n\n---\n### `__sub__(self, other):`\n\nSubtracts two RealNumber objects.\n\n\u003e ##### **Parameters:**\n\n        - other (RealNumber or float):\n                The RealNumber object or float to subtract.\n\n\u003e ##### **Returns:**\n\n        - RealNumber: \n                A new RealNumber object with the difference of the two numbers.\n\n        if isinstance(other, RealNumber):\n                return RealNumber(self.value - other.value)\n        elif isinstance(other, float):\n                return RealNumber(self.value - other)\n        else:\n                return NotImplemented\n\n---\n### `__mul__(self, other):`\n\nMultiplies two RealNumber objects.\n\n\u003e ##### **Parameters:**\n\n        - other (RealNumber or float):\n                The RealNumber object or float to multiply.\n\n\u003e ##### **Returns:**\n\n        - RealNumber: \n                A new RealNumber object with the product of the two numbers.\n\n        if isinstance(other, RealNumber):\n                return RealNumber(self.value * other.value)\n        elif isinstance(other, float):\n                return RealNumber(self.value * other)\n        else:\n                return NotImplemented\n\n---\n### `__truediv__(self, other):`\n\nDivides two RealNumber objects.\n\n\u003e ##### **Parameters:**\n\n        - other (RealNumber or float):\n                The RealNumber object or float to divide by.\n\n\u003e ##### **Returns:**\n\n        - RealNumber: \n                A new RealNumber object with the quotient of the two numbers.\n\n        if isinstance(other, RealNumber):\n                return RealNumber(self.value / other.value)\n        elif isinstance(other, float):\n                return RealNumber(self.value / other)\n        else:\n                return NotImplemented\n\n---\n### `__abs__(self):`\n\nReturns the absolute value of the RealNumber object.\n\n\u003e ##### **Returns:**\n\n        - RealNumber: \n                A new RealNumber object with the absolute value of the number.\n\n        return RealNumber(abs(self.value))\n\n---\n### `__neg__(self):`\n\nReturns the negation of the RealNumber object.\n\n\u003e ##### **Returns:**\n\n        - RealNumber:\n                A new RealNumber object with the negation of the number.\n\n        return RealNumber(-self.value)\n\n---\n### `sqrt(self):`\n\nReturns the square root of the RealNumber object.\n\n\u003e ##### **Returns:**\n\n        - RealNumber:\n                A new RealNumber object with the square root of the number.\n\n        return RealNumber(self.value ** 0.5)\n    \n---\n### `__pow__(self, other):`\n\nComputes the power of the real number to the given exponent.\n\n\u003e ##### **Parameters:**\n\n        - other (float):\n                The exponent.\n\n\u003e ##### **Returns:**\n\n        - RealNumber:\n                A new RealNumber object with the result of the power operation.\n\n        return RealNumber(self.value ** other)\n\n\n---\n## **RationalNumber class:**\n\nA class representing a rational number.\n\n\u003e ##### **Attributes:**\n\n        - numerator (int):\n                The numerator of the rational number.\n\n        - denominator (int):\n                The denominator of the rational number.\n\n\u003e ##### **Methods:**\n\n        - simplify:\n                Simplifies the rational number.\n\n        - add:\n                Adds two rational numbers.\n\n        - subtract:\n                Subtracts two rational numbers.\n\n        - multiply:\n                Multiplies two rational numbers.\n\n        - divide:\n                Divides two rational numbers.\n\n\n---\n### `__init__(self, numerator, denominator):`\n\nInitializes a rational number with the given numerator and denominator.\n\n\u003e ##### **Arguments:**\n\n        - numerator (int):\n                The numerator of the rational number.\n\n        - denominator (int):\n                The denominator of the rational number.\n\n\u003e ##### **Raises:**\n\n        - ValueError:\n                If the denominator is zero.\n\n        if denominator == 0:\n                raise ValueError(\"Denominator cannot be zero\")\n        self.numerator = numerator\n        self.denominator = denominator\n        self.simplify()\n\n---\n### `__str__(self):`\n\nReturns the string representation of the rational number.\n\n\u003e ##### **Returns:**\n\n        return f\"{self.numerator}/{self.denominator}\"\n\n---\n### `simplify(self):`\n\nSimplifies the rational number.\n\n\u003e ##### **Returns:**\n\n        gcd = self.gcd(self.numerator, self.denominator)\n        self.numerator //= gcd\n        self.denominator //= gcd\n\n---\n### `gcd(a, b):`\n\nComputes the greatest common divisor of two numbers a and b.\n\n\u003e ##### **Arguments:**\n\n        - a (int): The first number.\n        - b (int): The second number.\n\n\u003e ##### **Returns:**\n\n        - int:\n                The greatest common divisor of a and b.\n\n        while b:\n                a, b = b, a % b\n        return a\n\n---\n### `add(self, other):`\n\nAdds two rational numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (RationalNumber): The other rational number.\n\n\u003e ##### **Returns:**\n\n        - RationalNumber: The sum of the two rational numbers.\n\n        numerator = self.numerator * other.denominator + other.numerator * self.denominator\n        denominator = self.denominator * other.denominator\n        return RationalNumber(numerator, denominator)\n\n---\n### `subtract(self, other):`\n\nSubtracts two rational numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (RationalNumber): The other rational number.\n\n\u003e ##### **Returns:**\n\n        - RationalNumber: The difference of the two rational numbers.\n\n        numerator = self.numerator * other.denominator - other.numerator * self.denominator\n        denominator = self.denominator * other.denominator\n        return RationalNumber(numerator, denominator)\n\n---\n### `multiply(self, other):`\n\nMultiplies two rational numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (RationalNumber): The other rational number.\n\n\u003e ##### **Returns:**\n\n        - RationalNumber: The product of the two rational numbers.\n\n        numerator = self.numerator * other.numerator\n        denominator = self.denominator * other.denominator\n        return RationalNumber(numerator, denominator)\n\n---\n### `divide(self, other):`\n\nDivides two rational numbers.\n\n\u003e ##### **Arguments:**\n\n        - other (RationalNumber): The other rational number.\n\n\u003e ##### **Returns:**\n\n        - RationalNumber: The quotient of the two rational numbers.\n\n        numerator = self.numerator * other.denominator\n        denominator = self.denominator * other.numerator\n        return RationalNumber(numerator, denominator)\n\n##\n---\n## **IntegralNumber class:**\n\nA class representing integral numbers.\n\n\u003e ##### **Attributes**\n\n        - value: int\n                The value of the integral number.\n\n\u003e ##### **Methods**\n\n        __init__(self, value: int) -\u003e None:\n                Initializes a new instance of the IntegralNumber class with the specified integer value.\n\n        __repr__(self) -\u003e str:\n                Returns a string representation of the IntegralNumber object.\n\n        __eq__(self, other: 'IntegralNumber') -\u003e bool:\n                Determines if the current IntegralNumber object is equal to another IntegralNumber object.\n\n        __lt__(self, other: 'IntegralNumber') -\u003e bool:\n                Determines if the current IntegralNumber object is less than another IntegralNumber object.\n\n        __add__(self, ot","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamjuniorb%2Fpymaths","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamjuniorb%2Fpymaths","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamjuniorb%2Fpymaths/lists"}