this module is an improvement of MathModule V3
UltiMath Functions
ㅤChance Functions
ㅤㅤMean
UltiMath.Chance:Mean() will find the mean out of a set of numbers
print(math.Chance:Mean(
1,
2,
3,
4,
5
)) --OUTPUT: 3
this outputs as 3
ㅤㅤMedian
UltiMath.Chance:Median() will find the median out of a set of numbers
print(math.Chance:Median(
1,
2,
3,
4,
5
)) --OUTPUT: 3
this outputs as 3
ㅤㅤMode
UltiMath.Chance:Mode() will find the mode out of a set of values
print(math.Chance:Mode(
1,
2,
3,
4,
5
)) --OUTPUT: {...}1
this outputs as a table containing the values that occur the most and a number for how many times the the values in the table have occurred
ㅤㅤRange
UltiMath.Chance:Range() will find the range out of a set of numbers
print(math.Chance:Range(
1,
2,
3,
4,
5
)) --OUTPUT: 4
this outputs as 4
ㅤㅤMidRange
UltiMath.Chance:MidRange() will find the mid range out of a set of numbers
print(math.Chance:MidRange(
1,
2,
3,
4,
5
)) --OUTPUT: 3
this outputs as 3
ㅤㅤFirstQuartile
UltiMath.Chance:FirstQuartile() will find the first quartile out of a set of numbers
print(math.Chance:FirstQuartile(
1,
2,
3,
4,
5
)) --OUTPUT: 1.5
this outputs as 1.5
ㅤㅤThirdQuartile
UltiMath.Chance:ThirdQuartile() will find the third quartile out of a set of numbers
print(math.Chance:ThirdQuartile(
1,
2,
3,
4,
5
)) --OUTPUT: 4.5
this outputs as 4.5
ㅤㅤInterquartileRange
UltiMath.Chance:InterquartileRange() will find the interquartile range out of a set of numbers
print(math.Chance:InterquartileRange(
1,
2,
3,
4,
5
)) --OUTPUT: 3
this outputs as 3
ㅤㅤStandardDeviation
UltiMath.Chance:StandardDeviation() will find the standard deviation out of a set of numbers
print(math.Chance:StandardDeviation(
1,
2,
3,
4,
5
)) --OUTPUT: 1.4142135623731
this outputs as the square root of 2
ㅤㅤZScore
UltiMath.Chance:ZScore() will find the z scores for each individual number
print(math.Chance:ZScore(
1,
2,
3,
4,
5
)) --OUTPUT: {...}
this outputs as a table containing each of the number’s z scores
ㅤㅤPermutation
UltiMath.Chance:Permutation() will find the number of possible permutations for n and r
print(math.Chance:Permutation(
5, --total items from set
3 --selected items from set
)) --OUTPUT: 60
this outputs as 60
ㅤㅤCombination
UltiMath.Chance:Combination() will find the number of possible combinations for n and r
print(math.Chance:Combination(
5, --total items from set
3 --selected items from set
)) --OUTPUT: 10
this outputs as 10
ㅤCheck Functions
ㅤㅤInteger
UltiMath.Check:Integer() will check if the number is an integer
print(math.Check:Integer(
5
)) --OUTPUT: true
this outputs as true
ㅤㅤNonInteger
UltiMath.Check:NonInteger() will check if the number is a non integer
print(math.Check:NonInteger(
0.5
)) --OUTPUT: true
this outputs as true
ㅤㅤPrime
UltiMath.Check:Prime() will check if the number is a prime number
print(math.Check:Prime(
2
)) --OUTPUT: true
this outputs as true
ㅤㅤUnprimeable
UltiMath.Check:Unprimeable() will check if the number is a unprimeable number
print(math.Check:Unprimeable(
200
)) --OUTPUT: true
this outputs as true
ㅤㅤWeakPrime
UltiMath.Check:WeakPrime() will check if the number is a weak prime number
print(math.Check:WeakPrime(
3
)) --OUTPUT: true
this outputs as true
ㅤㅤStrongPrime
UltiMath.Check:StrongPrime() will check if the number is a strong prime number
print(math.Check:StrongPrime(
11
)) --OUTPUT: true
this outputs as true
ㅤConvert Functions
ㅤㅤDecimalToBase
UltiMath.Convert:DecimalToBase() will convert base 10 into any base
print(math.Convert:DecimalToBase(
10, --base 10 value
2 --base value
)) --OUTPUT: 1010
this outputs as 1010
ㅤㅤBaseToDecimal
UltiMath.Convert:BaseToDecimal() will convert any base into base 10
print(math.Convert:BaseToDecimal(
1010, --base value
2 --the base value's current base
)) --OUTPUT: 10
this outputs as 10
ㅤㅤBaseToBase
UltiMath.Convert:BaseToBase() will convert any base into any base
print(math.Convert:BaseToBase(
1010, --number
2, --the number's current base
16 --the base you want to convert the number to
)) --OUTPUT: A
this outputs as A
ㅤㅤDecimalToRomanNumeral
UltiMath.Convert:DecimalToRomanNumeral() will convert base 10 into roman numerals
print(math.Convert:DecimalToRomanNumeral(
100 --base 10 value
)) --OUTPUT: C
this outputs as C
ㅤㅤRomanNumeralToDecimal
UltiMath.Convert:RomanNumeralToDecimal() will convert roman numerals into base 10
print(math.Convert:RomanNumeralToDecimal(
"C" --roman numeral
)) --OUTPUT: 100
this outputs as 100
ㅤㅤNumberToWord
UltiMath.Convert:NumberToWord() will convert a number into words
print(math.Convert:NumberToWord(
100 --number
)) --OUTPUT: One Hundred
this outputs as One Hundred
ㅤㅤFahrenheitToCelsius
UltiMath.Convert:FahrenheitToCelsius() will convert fahrenheit into celsius
print(math.Convert:FahrenheitToCelsius(
0 --fahrenheit
)) --OUTPUT: -17.777777777778
this outputs as -17.(7/9)
ㅤㅤCelsiusToFahrenheit
UltiMath.Convert:CelsiusToFahrenheit() will convert celsius into fahrenheit
print(math.Convert:CelsiusToFahrenheit(
0 --celsius
)) --OUTPUT: 32
this outputs as 32
ㅤMatrix Functions
ㅤㅤMultiplication
UltiMath.Matrix:Multiplication() will get the product of two matrices
print(math.Matrix:Multiplication(
{
{1, 2, 3},
{1, 2, 3}
},
{
{5, 6, 7},
{5, 6, 7},
{5, 6, 7}
}
)) --OUTPUT: {{...}, {...}}
this outputs as a matrix that is the product of the two matrices given
ㅤㅤDotProduct
UltiMath.Matrix:DotProduct() will get the dot product of two arrays
print(math.Matrix:DotProduct(
{1, 3, -5},
{4, -2, 1}
)) --OUTPUT: -7
this outputs as -7
ㅤㅤCrossProduct
UltiMath.Matrix:CrossProduct() will get the cross product of two arrays
print(math.Matrix:CrossProduct(
{3, 4, 5},
{4, 3, 5}
)) --OUTPUT: {...}
this outputs as an array that is the cross product of the two arrays given
ㅤㅤTensorProduct
UltiMath.Matrix:TensorProduct() will get the tensor product of two matrices
print(math.Matrix:TensorProduct(
{
{1, 2},
{3, 4}
},
{
{5, 6},
{7, 8}
}
)) --OUTPUT: {{...}, {...}, {...}, {...}}
this outputs as a matrix that is the tensor product of the two matrices given
ㅤㅤTransposition
UltiMath.Matrix:Transposition() will get the transposition of a matrix
print(math.Matrix:Transposition({
{1, 2},
{3, 4},
{5, 6},
{7, 8}
})) --OUTPUT: {{...}, {...}}
this outputs as a matrix that is the transposition of the matrix given
ㅤㅤZigZag
UltiMath.Matrix:ZigZag() will make a zig zag matrix using a number
print(math.Matrix:ZigZag(
5
)) --OUTPUT: {{...}, {...}, {...}, {...}, {...}}
this outputs as a 5x5 zig zag matrix
ㅤㅤSpiral
UltiMath.Matrix:Spiral() will make a spiral matrix using a number
print(math.Matrix:Spiral(
5
)) --OUTPUT: {{...}, {...}, {...}, {...}, {...}}
this outputs as a 5x5 spiral matrix
ㅤNotation Functions
ㅤㅤScientific
UltiMath.Notation:Scientific() will convert a number into scientific notation
print(math.Notation:Scientific(
100
)) --OUTPUT: 1 * 10^2
this outputs as 1 * 10^2
ㅤㅤE
UltiMath.Notation:E() will convert a number into e notation
print(math.Notation:E(
100
)) --OUTPUT: 1e+2
this outputs as 1e+2
ㅤㅤEngineering
UltiMath.Notation:Engineering() will convert a number into engineering notation
print(math.Notation:Engineering(
100
)) --OUTPUT: 100 * 10^0
this outputs as 100 * 10^0
ㅤRandom Functions
ㅤㅤAddition
UltiMath.Random:Addition() will get a certain amount of numbers that add up to the final number, these numbers will be between min and max
print(math.Random:Addition(
1, --min
5, --max
20, --final number
5 --amount of numbers
)) --OUTPUT: {...}
this outputs as a table that contains random numbers that add up to the final number
ㅤㅤMultiplication
UltiMath.Random:Multiplication() will get a certain amount of numbers that multiply up to the final number, these numbers will be between min and max
print(math.Random:Multiplication(
1, --min
5, --max
20, --final number
2 --amount of numbers
)) --OUTPUT: {...}
this outputs as a table that contains random numbers that multiply up to the final number
ㅤㅤInteger
UltiMath.Random:Integer() will get a random integer between min and max
print(math.Random:Integer(
0, --min
5 --max
)) --OUTPUT: N
this outputs as a random integer between min and max
ㅤㅤNonInteger
UltiMath.Random:NonInteger() will get a random non integer between min and max
print(math.Random:NonInteger(
0, --min
5 --max
)) --OUTPUT: N
this outputs as a random non integer between min and max
ㅤSequence Functions
ㅤㅤThueMorse
UltiMath.Sequence:ThueMorse() will get the Nth thue morse sequence
print(math.Sequence:ThueMorse(
5
)) --OUTPUT: 01101001100101101001011001101001
this outputs as 01101001100101101001011001101001
ㅤㅤInteger
UltiMath.Sequence:Integer() will get the first Nth integers between the (min and max)th integers
print(math.Sequence:Integer(
1, --min
5 --max
)) --OUTPUT: {...}
this outputs as a table containing the first Nth integers between the (min and max)th integers
ㅤㅤPrime
UltiMath.Sequence:Prime() will get the first Nth prime numbers between the (min and max)th prime numbers
print(math.Sequence:Prime(
1, --min
5 --max
)) --OUTPUT: {...}
this outputs as a table containing the first Nth prime numbers between the (min and max)th prime numbers
ㅤㅤUnprimeable
UltiMath.Sequence:Unprimeable() will get the first Nth unprimeable numbers between the (min and max)th unprimeable numbers
print(math.Sequence:Unprimeable(
1, --min
5 --max
)) --OUTPUT: {...}
this outputs as a table containing the first Nth unprimeable numbers between the (min and max)th unprimeable numbers
ㅤㅤWeakPrime
UltiMath.Sequence:WeakPrime() will get the first Nth weak prime numbers between the (min and max)th weak prime numbers
print(math.Sequence:WeakPrime(
1, --min
5 --max
)) --OUTPUT: {...}
this outputs as a table containing the first Nth weak prime numbers between the (min and max)th weak prime numbers
ㅤㅤStrongPrime
UltiMath.Sequence:StrongPrime() will get the first Nth strong prime numbers between the (min and max)th strong prime numbers
print(math.Sequence:StrongPrime(
1, --min
5 --max
)) --OUTPUT: {...}
this outputs as a table containing the first Nth strong prime numbers between the (min and max)th strong prime numbers
ㅤSpecial Functions
ㅤㅤFactorial
UltiMath.Special:Factorial() will get the factorial of a number
print(math.Special:Factorial(
5
)) --OUTPUT: 120
this outputs as 120
ㅤㅤNthRoot
UltiMath.Special:NthRoot() will get the Nth root of a number
print(math.Special:NthRoot(
16, --Number
4 --Root
)) --OUTPUT: 2
this outputs as 2
ㅤㅤPerNth
UltiMath.Special:PerNth() will get the per Nth of a number
print(math.Special:PerNth(
50, --Number
100 --Nth Value
)) --OUTPUT: 0.5 or 50%
this outputs as 0.5 or 50%
ㅤString Functions
ㅤㅤJaroSimilarity
UltiMath.String:JaroSimilarity() will get the jaro similarity of two strings
print(math.String:JaroSimilarity(
"wassup", --string1
"sup" --string2
)) --OUTPUT: 0.83333333333333
this outputs as 5/6
ㅤㅤJaroDistance
UltiMath.String:JaroDistance() will get the jaro distance of two strings
print(math.String:JaroDistance(
"wassup", --string1
"sup" --string2
)) --OUTPUT: 0.16666666666667
this outputs as 1/6
ㅤㅤJaroWinklerSimilarity
UltiMath.String:JaroWinklerSimilarity() will get the jaro winkler similarity of two strings
print(math.String:JaroWinklerSimilarity(
"wassup", --string1
"sup" --string2
)) --OUTPUT: 0.83333333333333
this outputs as 5/6
ㅤㅤJaroWinklerDistance
UltiMath.String:JaroWinklerDistance() will get the jaro winkler distance of two strings
print(math.String:JaroWinklerDistance(
"wassup", --string1
"sup" --string2
)) --OUTPUT: 0.16666666666667
this outputs as 1/6
ㅤㅤLevenshteinDistance
UltiMath.String:LevenshteinDistance() will get the levenshtein distance of two strings
print(math.String:LevenshteinDistance(
"wassup", --string1
"sup" --string2
)) --OUTPUT: 3
this outputs as 3
ㅤValue Functions
ㅤㅤEulersNumber
UltiMath.Value:EulersNumber() will get euler’s number
print(math.Value:EulersNumber()) --OUTPUT: 2.718281828459046
this outputs as e
ㅤㅤEulersConstant
UltiMath.Value:EulersConstant() will get euler’s constant
print(math.Value:EulersConstant()) --OUTPUT: 0.577215664901
this outputs as 0.577215664901
ㅤㅤGammaCoeff
UltiMath.Value:GammaCoeff() will get gamma coefficient
print(math.Value:GammaCoeff()) --OUTPUT: -0.65587807152056
this outputs as -0.65587807152056
ㅤㅤGammaQuad
UltiMath.Value:GammaQuad() will get gamma quad
print(math.Value:GammaQuad()) --OUTPUT: -0.042002635033944
this outputs as -0.042002635033944
ㅤㅤGammaQui
UltiMath.Value:GammaQui() will get gamma qui
print(math.Value:GammaQui()) --OUTPUT: 0.16653861138228
this outputs as 0.16653861138228
ㅤㅤGammaSet
UltiMath.Value:GammaSet() will get gamma set
print(math.Value:GammaSet()) --OUTPUT: -0.042197734555571
this outputs as -0.042197734555571
ㅤㅤTau
UltiMath.Value:Tau() will get Tau
print(math.Value:Tau()) --OUTPUT: 6.2831853071796
this outputs as pi * 2
ㅤㅤAperysConstant
UltiMath.Value:AperysConstant() will get apery’s constant
print(math.Value:AperysConstant()) --OUTPUT: 1.2020569031573
this outputs as 423203577229 / 352066176000
ㅤㅤBelphegorsPrimeNumber
UltiMath.Value:BelphegorsPrimeNumber() will get belphegor’s prime number
print(math.Value:BelphegorsPrimeNumber()) --OUTPUT: 1000000000000066600000000000001
this outputs as 10^30 + 666 * 10^14 + 1
ㅤㅤMetallicRatio
UltiMath.Value:MetallicRatio() will get the Nth metallic ratio
print(math.Value:MetallicRatio(1)) --OUTPUT: 1.6180339887499
this outputs as 1.6180339887499
how to add your own functions
you now have all the information you need to use the functions, so what are your steps to using the module?
- get the module UltiMath - Roblox or you can require it with the id
local UltiMath = require(7194842010)
- enjoy coding!
please tell me if I have any typos at all, and what I can improve on the module
thanks for reading