From fba74b2be4b1774d1c6254eeb50583d74ba23b61 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Wed, 11 Oct 2023 18:21:46 +0300 Subject: [PATCH] fix formatting --- third_party/math/README.md | 114 ++++++++++++++++++------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/third_party/math/README.md b/third_party/math/README.md index b006d78..5e084e6 100644 --- a/third_party/math/README.md +++ b/third_party/math/README.md @@ -5,117 +5,117 @@ A math pacakage written in pure Nuru by [VictorKariuki](https://github.com/Victo ## Explanation -A detailed list of all methods and description and example: +A detailed list of all methods and - Description and - Example: ### abs(namba) -Description: Calculates the absolute value of a number. -Example: Hisabati.abs(-42) returns 42. +- Description: Calculates the absolute value of a number. +- Example: Hisabati.abs(-42) returns 42. ### acos(x) -Description: Calculates the arccosine (inverse cosine) of a number in radians. -Example: Hisabati.acos(0.5) returns the arccosine of 0.5. +- Description: Calculates the arccosine (inverse cosine) of a number in radians. +- Example: Hisabati.acos(0.5) returns the arccosine of 0.5. ### acosh(x) -Description: Calculates the inverse hyperbolic cosine of a number. -Example: Hisabati.acosh(2) returns the inverse hyperbolic cosine of 2. +- Description: Calculates the inverse hyperbolic cosine of a number. +- Example: Hisabati.acosh(2) returns the inverse hyperbolic cosine of 2. ### arcsin(x) -Description: Calculates the arcsine (inverse sine) of a number using a Taylor series. -Example: Hisabati.arcsin(0.5) returns the arcsine of 0.5. +- Description: Calculates the arcsine (inverse sine) of a number using a Taylor series. +- Example: Hisabati.arcsin(0.5) returns the arcsine of 0.5. ### arsinh(x) -Description: Calculates the inverse hyperbolic sine of a number. -Example: Hisabati.arsinh(1) returns the inverse hyperbolic sine of 1. +- Description: Calculates the inverse hyperbolic sine of a number. +- Example: Hisabati.arsinh(1) returns the inverse hyperbolic sine of 1. ### atan(x) -Description: Calculates the arctangent (inverse tangent) of a number in radians using a Taylor series. -Example: Hisabati.atan(1) returns the arctangent of 1. +- Description: Calculates the arctangent (inverse tangent) of a number in radians using a Taylor series. +- Example: Hisabati.atan(1) returns the arctangent of 1. ### atan2(y, x) -Description: Calculates the angle in radians between the positive x-axis and the point (x, y). -Example: Hisabati.atan2(1, 1) returns the angle for the point (1, 1). +- Description: Calculates the angle in radians between the positive x-axis and the point (x, y). +- Example: Hisabati.atan2(1, 1) returns the angle for the point (1, 1). ### atanh(x) -Description: Calculates the inverse hyperbolic tangent of a number. -Example: Hisabati.atanh(0.5) returns the inverse hyperbolic tangent of 0.5. +- Description: Calculates the inverse hyperbolic tangent of a number. +- Example: Hisabati.atanh(0.5) returns the inverse hyperbolic tangent of 0.5. ### cbrt(x) -Description: Calculates the cube root of a number. -Example: Hisabati.cbrt(8) returns the cube root of 8. +- Description: Calculates the cube root of a number. +- Example: Hisabati.cbrt(8) returns the cube root of 8. ### ceil(x) -Description: Rounds up to the smallest integer greater than or equal to a given number. -Example: Hisabati.ceil(4.2) returns 5. +- Description: Rounds up to the smallest integer greater than or equal to a given number. +- Example: Hisabati.ceil(4.2) returns 5. ### cos(x, terms) -Description: Calculates the cosine of a number in radians using a Taylor series. -Example: Hisabati.cos(1) returns the cosine of 1. +- Description: Calculates the cosine of a number in radians using a Taylor series. +- Example: Hisabati.cos(1) returns the cosine of 1. ### cosh(x) -Description: Calculates the hyperbolic cosine of a number. -Example: Hisabati.cosh(2) returns the hyperbolic cosine of 2. +- Description: Calculates the hyperbolic cosine of a number. +- Example: Hisabati.cosh(2) returns the hyperbolic cosine of 2. ### exp(x, precision) -Description: Calculates the value of the mathematical constant e raised to the power of x using a Taylor series. -Example: Hisabati.exp(2) returns e^2. +- Description: Calculates the value of the mathematical constant e raised to the power of x using a Taylor series. +- Example: Hisabati.exp(2) returns e^2. ### expm1(x) -Description: Calculates the value of e^x - 1 using a Taylor series. -Example: Hisabati.expm1(1) returns e - 1. +- Description: Calculates the value of e^x - 1 using a Taylor series. +- Example: Hisabati.expm1(1) returns e - 1. ### floor(x) -Description: Rounds down to the largest integer less than or equal to a given number. -Example: Hisabati.floor(4.9) returns 4. +- Description: Rounds down to the largest integer less than or equal to a given number. +- Example: Hisabati.floor(4.9) returns 4. ### hypot(values) -Description: Calculates the Euclidean norm (square root of the sum of squares) of a list of values. -Example: Hisabati.hypot([3, 4]) returns 5, which is the hypotenuse of a right triangle. +- Description: Calculates the Euclidean norm (square root of the sum of squares) of a list of values. +- Example: Hisabati.hypot([3, 4]) returns 5, which is the hypotenuse of a right triangle. ### log(x) -Description: Calculates the natural logarithm of a number using a Taylor series. -Example: Hisabati.log(2) returns the natural logarithm of 2. +- Description: Calculates the natural logarithm of a number using a Taylor series. +- Example: Hisabati.log(2) returns the natural logarithm of 2. ### log10(x) -Description: Calculates the base 10 logarithm of a number using the natural logarithm. -Example: Hisabati.log10(100) returns 2. +- Description: Calculates the base 10 logarithm of a number using the natural logarithm. +- Example: Hisabati.log10(100) returns 2. ### log1p(x) -Description: Calculates the natural logarithm of 1 + x using a Taylor series. -Example: Hisabati.log1p(0.5) returns the natural logarithm of 1.5. +- Description: Calculates the natural logarithm of 1 + x using a Taylor series. +- Example: Hisabati.log1p(0.5) returns the natural logarithm of 1.5. ### log2(x) -Description: Calculates the base 2 logarithm of a number. -Example: Hisabati.log2(8) returns 3. +- Description: Calculates the base 2 logarithm of a number. +- Example: Hisabati.log2(8) returns 3. ### max(numbers) -Description: Returns the largest number from a list of numbers. -Example: Hisabati.max([3, 7, 2, 9]) returns 9. +- Description: Returns the largest number from a list of numbers. +- Example: Hisabati.max([3, 7, 2, 9]) returns 9. ### min(numbers) -Description: Returns the smallest number from a list of numbers. -Example: Hisabati.min([3, 7, 2, 9]) returns 2. +- Description: Returns the smallest number from a list of numbers. +- Example: Hisabati.min([3, 7, 2, 9]) returns 2. ### round(x, method) -Description: Rounds a number to the nearest integer using different rounding methods. -Example: Hisabati.round(3.6, "rpi") rounds to the nearest integer (4) using "round half up." +- Description: Rounds a number to the nearest integer using different rounding methods. +- Example: Hisabati.round(3.6, "rpi") rounds to the nearest integer (4) using "round half up." ### sign(x) -Description: Returns the sign of a number: 1 for positive, -1 for negative, and 0 for zero. -Example: Hisabati.sign(-7) returns -1. +- Description: Returns the sign of a number: 1 for positive, -1 for negative, and 0 for zero. +- Example: Hisabati.sign(-7) returns -1. ### sin(x, terms) -Description: Calculates the sine of a number in radians using a Taylor series. -Example: Hisabati.sin(0.5) returns the sine of 0.5. +- Description: Calculates the sine of a number in radians using a Taylor series. +- Example: Hisabati.sin(0.5) returns the sine of 0.5. ### sinh(x) -Description: Calculates the hyperbolic sine of a number. -Example: Hisabati.sinh(1) returns the hyperbolic sine of 1. +- Description: Calculates the hyperbolic sine of a number. +- Example: Hisabati.sinh(1) returns the hyperbolic sine of 1. ### sqrt(x) -Description: Calculates the square root of a number using the Newton-Raphson method. -Example: Hisabati.sqrt(16) returns 4. +- Description: Calculates the square root of a number using the Newton-Raphson method. +- Example: Hisabati.sqrt(16) returns 4. ### sine(x) -Description: Calculates the sine of a number in radians using a Taylor series. -Example: Hisabati.sine(1.5) returns the sine of 1.5 \ No newline at end of file +- Description: Calculates the sine of a number in radians using a Taylor series. +- Example: Hisabati.sine(1.5) returns the sine of 1.5 \ No newline at end of file