Math
Arcade.dev LLM tools for doing math
1.0.5Arcade.dev provides a Math toolkit that enables seamless mathematical operations for developers, facilitating complex calculations with ease. This toolkit supports a variety of foundational math functions to enhance applications and streamline computations.
Capabilities
- Perform basic arithmetic operations (addition, subtraction, multiplication, division)
- Generate random integers and floats within specified ranges
- Calculate statistical measures (mean, median, average)
- Execute advanced functions such as GCD, LCM, and factorial
- Transform angle measures between degrees and radians
Secrets
- No secrets are used in the toolkit.
Available tools(23)
| Tool name | Description | Secrets | |
|---|---|---|---|
Calculate the absolute value of a number | |||
Add two numbers together | |||
Calculate the average (mean) of a list of numbers.
Returns "0.0" if the list is empty. | |||
Return the ceiling of a number | |||
Convert an angle from degrees to radians. | |||
Divide two numbers | |||
Compute the factorial of a non-negative integer
Returns "1" for "0" | |||
Return the floor of a number | |||
Calculate the greatest common divisor (GCD) of two integers. | |||
Generate a random float between min_value and max_value. | |||
Generate a random integer between min_value and max_value (inclusive). | |||
Calculate the least common multiple (LCM) of two integers.
Returns "0" if either integer is 0. | |||
Calculate the logarithm of a number with a given base | |||
Calculate the median of a list of numbers.
Returns "0.0" if the list is empty. | |||
Calculate the remainder (modulus) of one number divided by another | |||
Multiply two numbers together | |||
Calculate one number raised to the power of another | |||
Convert an angle from radians to degrees. | |||
Round a number to a specified number of positive digits | |||
Get the square root of a number | |||
Subtract two numbers | |||
Sum all numbers in a list | |||
Sum all numbers from start through end |
Selected tools
No tools selected.
Click "Show all tools" to add tools.
Requirements
Select tools to see requirements
Math.AbsVal
Calculate the absolute value of a number
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The number as a string |
Requirements
Output
string— The absolute value of the number as a stringMath.Add
Add two numbers together
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The first number as a string |
b | string | Required | The second number as a string |
Requirements
Output
string— The sum of the two numbers as a stringMath.Avg
Calculate the average (mean) of a list of numbers. Returns "0.0" if the list is empty.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
numbers | array<string> | Required | The list of numbers as strings |
Requirements
Output
string— The average (mean) of the numbers in the list as a stringMath.Ceil
Return the ceiling of a number
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The number to round up as a string |
Requirements
Output
string— The smallest integer greater than or equal to the number as a stringMath.DegToRad
Convert an angle from degrees to radians.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
degrees | string | Required | Angle in degrees as a string |
Requirements
Output
string— Angle in radians as a stringMath.Divide
Divide two numbers
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The first number as a string |
b | string | Required | The second number as a string |
Requirements
Output
string— The quotient of the two numbers as a stringMath.Factorial
Compute the factorial of a non-negative integer Returns "1" for "0"
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The non-negative integer to compute the factorial for as a string |
Requirements
Output
string— The factorial of the number as a stringMath.Floor
Return the floor of a number
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The number to round down as a string |
Requirements
Output
string— The largest integer less than or equal to the number as a stringMath.Gcd
Calculate the greatest common divisor (GCD) of two integers.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | First integer as a string |
b | string | Required | Second integer as a string |
Requirements
Output
string— The greatest common divisor of a and b as a stringMath.GenerateRandomFloat
Generate a random float between min_value and max_value.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
min_value | string | Required | The minimum value of the random float as a string |
max_value | string | Required | The maximum value of the random float as a string |
seed | string | Optional | The seed for the random number generator as a string. If None, the current system time is used. |
Requirements
Output
string— A random float between min_value and max_value as a stringMath.GenerateRandomInt
Generate a random integer between min_value and max_value (inclusive).
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
min_value | string | Required | The minimum value of the random integer as a string |
max_value | string | Required | The maximum value of the random integer as a string |
seed | string | Optional | The seed for the random number generator as a string. If None, the current system time is used. |
Requirements
Output
string— A random integer between min_value and max_value as a stringMath.Lcm
Calculate the least common multiple (LCM) of two integers. Returns "0" if either integer is 0.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | First integer as a string |
b | string | Required | Second integer as a string |
Requirements
Output
string— The least common multiple of a and b as a stringMath.Log
Calculate the logarithm of a number with a given base
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The number to take the logarithm of as a string |
base | string | Required | The logarithmic base as a string |
Requirements
Output
string— The logarithm of the number with the specified base as a stringMath.Median
Calculate the median of a list of numbers. Returns "0.0" if the list is empty.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
numbers | array<string> | Required | A list of numbers as strings |
Requirements
Output
string— The median value of the numbers in the list as a stringMath.Mod
Calculate the remainder (modulus) of one number divided by another
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The dividend as a string |
b | string | Required | The divisor as a string |
Requirements
Output
string— The remainder after dividing a by b as a stringMath.Multiply
Multiply two numbers together
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The first number as a string |
b | string | Required | The second number as a string |
Requirements
Output
string— The product of the two numbers as a stringMath.Power
Calculate one number raised to the power of another
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The base number as a string |
b | string | Required | The exponent as a string |
Requirements
Output
string— The result of raising a to the power of b as a stringMath.RadToDeg
Convert an angle from radians to degrees.
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
radians | string | Required | Angle in radians as a string |
Requirements
Output
string— Angle in degrees as a stringMath.RoundNum
Round a number to a specified number of positive digits
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
value | string | Required | The number to round as a string |
ndigits | string | Required | The number of digits after the decimal point as a string |
Requirements
Output
string— The number rounded to the specified number of digits as a stringMath.Sqrt
Get the square root of a number
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The number to square root as a string |
Requirements
Output
string— The square root of the number as a stringMath.Subtract
Subtract two numbers
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
a | string | Required | The first number as a string |
b | string | Required | The second number as a string |
Requirements
Output
string— The difference of the two numbers as a stringMath.SumList
Sum all numbers in a list
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
numbers | array<string> | Required | The list of numbers as strings |
Requirements
Output
string— The sum of the numbers in the list as a stringMath.SumRange
Sum all numbers from start through end
Parameters
| Parameter | Type | Req. | Description |
|---|---|---|---|
start | string | Required | The start of the range to sum as a string |
end | string | Required | The end of the range to sum as a string |
Requirements
Output
string— The sum of the numbers in the list as a string