umt 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/node.js.yml +1 -1
- package/.nvmrc +1 -0
- package/README.md +3 -1
- package/module/Array/arraysJoin.d.ts +7 -0
- package/module/{arraysJoin.js → Array/arraysJoin.js} +5 -0
- package/module/Array/getArraysDiff.d.ts +7 -0
- package/module/{getArraysDiff.js → Array/getArraysDiff.js} +5 -0
- package/module/Array/getArraysIntersect.d.ts +7 -0
- package/module/{getArraysIntersect.js → Array/getArraysIntersect.js} +5 -0
- package/module/Array/index.d.ts +5 -0
- package/module/Array/index.js +14 -0
- package/module/Array/quickSort.d.ts +8 -0
- package/module/{quickSort.js → Array/quickSort.js} +7 -1
- package/module/Date/index.d.ts +2 -0
- package/module/Date/index.js +8 -0
- package/module/Date/now.d.ts +2 -0
- package/module/Date/now.js +5 -0
- package/module/{addition.d.ts → Math/addition.d.ts} +5 -0
- package/module/{addition.js → Math/addition.js} +6 -1
- package/module/Math/average.d.ts +6 -0
- package/module/Math/average.js +12 -0
- package/module/Math/calculator/core.d.ts +8 -0
- package/module/{calculator.js → Math/calculator/core.js} +18 -15
- package/module/Math/calculator/index.d.ts +8 -0
- package/module/Math/calculator/index.js +23 -0
- package/module/Math/calculator/literalExpression.d.ts +5 -0
- package/module/Math/calculator/literalExpression.js +50 -0
- package/module/{degToRad.d.ts → Math/degToRad.d.ts} +4 -0
- package/module/{degToRad.js → Math/degToRad.js} +4 -0
- package/module/{division.d.ts → Math/division.d.ts} +5 -0
- package/module/{division.js → Math/division.js} +6 -1
- package/module/{euclideanAlgorithm.d.ts → Math/euclideanAlgorithm.d.ts} +6 -0
- package/module/{euclideanAlgorithm.js → Math/euclideanAlgorithm.js} +7 -0
- package/module/Math/factorial.d.ts +6 -0
- package/module/Math/factorial.js +13 -0
- package/module/Math/factorize.d.ts +6 -0
- package/module/Math/factorize.js +17 -0
- package/module/Math/gcd.d.ts +8 -0
- package/module/Math/gcd.js +31 -0
- package/module/{getDecimalLength.d.ts → Math/getDecimalLength.d.ts} +4 -0
- package/module/{getDecimalLength.js → Math/getDecimalLength.js} +4 -0
- package/module/Math/index.d.ts +33 -0
- package/module/Math/index.js +70 -0
- package/module/{isDouble.d.ts → Math/isDouble.d.ts} +4 -0
- package/module/{isDouble.js → Math/isDouble.js} +4 -0
- package/module/Math/isNumber.d.ts +7 -0
- package/module/{isNumber.js → Math/isNumber.js} +5 -0
- package/module/{isPrimeNumber.d.ts → Math/isPrimeNumber.d.ts} +4 -0
- package/module/{isPrimeNumber.js → Math/isPrimeNumber.js} +4 -0
- package/module/{lcm.d.ts → Math/lcm.d.ts} +5 -0
- package/module/{lcm.js → Math/lcm.js} +7 -2
- package/module/Math/max.d.ts +6 -0
- package/module/Math/max.js +8 -0
- package/module/{min.d.ts → Math/min.d.ts} +4 -0
- package/module/{min.js → Math/min.js} +4 -0
- package/module/Math/multiples.d.ts +7 -0
- package/module/Math/multiples.js +15 -0
- package/module/{multiplication.d.ts → Math/multiplication.d.ts} +5 -0
- package/module/{multiplication.js → Math/multiplication.js} +6 -1
- package/module/{nCr.d.ts → Math/nCr.d.ts} +5 -0
- package/module/{nCr.js → Math/nCr.js} +6 -0
- package/module/Math/nHr.d.ts +7 -0
- package/module/{nCrs.js → Math/nHr.js} +7 -2
- package/module/{nPr.d.ts → Math/nPr.d.ts} +5 -0
- package/module/{nPr.js → Math/nPr.js} +6 -0
- package/module/{primeFactorization.d.ts → Math/primeFactorization.d.ts} +4 -0
- package/module/{primeFactorization.js → Math/primeFactorization.js} +4 -0
- package/module/{quotient.d.ts → Math/quotient.d.ts} +5 -0
- package/module/{quotient.js → Math/quotient.js} +5 -0
- package/module/{radToDeg.d.ts → Math/radToDeg.d.ts} +4 -0
- package/module/{radToDeg.js → Math/radToDeg.js} +4 -0
- package/module/{random.d.ts → Math/random.d.ts} +4 -0
- package/module/{random.js → Math/random.js} +4 -0
- package/module/{reduce.d.ts → Math/reduce.d.ts} +5 -0
- package/module/{reduce.js → Math/reduce.js} +8 -3
- package/module/{repeatedTrial.d.ts → Math/repeatedTrial.d.ts} +6 -0
- package/module/Math/repeatedTrial.js +24 -0
- package/module/Math/standardDeviation.d.ts +6 -0
- package/module/Math/standardDeviation.js +22 -0
- package/module/{subtract.d.ts → Math/subtract.d.ts} +5 -0
- package/module/{subtract.js → Math/subtract.js} +6 -1
- package/module/{toBinary.d.ts → Math/toBinary.d.ts} +5 -0
- package/module/{toBinary.js → Math/toBinary.js} +5 -0
- package/module/Math/toCelsius.d.ts +2 -0
- package/module/Math/toCelsius.js +8 -0
- package/module/Math/toKelvin.d.ts +2 -0
- package/module/Math/toKelvin.js +8 -0
- package/module/Math/value.d.ts +2 -0
- package/module/Math/value.js +4 -0
- package/module/Math/valueSwap.d.ts +7 -0
- package/module/{valueSwap.js → Math/valueSwap.js} +5 -0
- package/module/Tool/birthday.d.ts +2 -0
- package/module/Tool/birthday.js +17 -0
- package/module/Tool/dayOfWeek.d.ts +6 -0
- package/module/Tool/dayOfWeek.js +4 -0
- package/module/Tool/index.d.ts +4 -0
- package/module/Tool/index.js +12 -0
- package/module/Tool/pipeFunction.d.ts +6 -0
- package/module/Tool/pipeFunction.js +4 -0
- package/module/index.d.ts +8 -75
- package/module/index.js +30 -93
- package/module/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/test.js +5 -0
- package/.github/workflows/npm-publish.yml +0 -34
- package/module/arraysJoin.d.ts +0 -2
- package/module/calculator.d.ts +0 -2
- package/module/fact.d.ts +0 -2
- package/module/fact.js +0 -11
- package/module/getArraysDiff.d.ts +0 -2
- package/module/getArraysIntersect.d.ts +0 -2
- package/module/isNumber.d.ts +0 -2
- package/module/max.d.ts +0 -2
- package/module/max.js +0 -4
- package/module/nCrs.d.ts +0 -2
- package/module/quickSort.d.ts +0 -2
- package/module/repeatedTrial.js +0 -15
- package/module/valueSwap.d.ts +0 -2
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v16.10.0
|
package/README.md
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.quickSort = exports.getArraysIntersect = exports.getArraysDiff = exports.arraysJoin = void 0;
|
|
7
|
+
const arraysJoin_1 = __importDefault(require("./arraysJoin"));
|
|
8
|
+
exports.arraysJoin = arraysJoin_1.default;
|
|
9
|
+
const getArraysDiff_1 = __importDefault(require("./getArraysDiff"));
|
|
10
|
+
exports.getArraysDiff = getArraysDiff_1.default;
|
|
11
|
+
const getArraysIntersect_1 = __importDefault(require("./getArraysIntersect"));
|
|
12
|
+
exports.getArraysIntersect = getArraysIntersect_1.default;
|
|
13
|
+
const quickSort_1 = __importDefault(require("./quickSort"));
|
|
14
|
+
exports.quickSort = quickSort_1.default;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* 配列を高速にソート
|
|
5
|
+
* @param {any[]} array
|
|
6
|
+
* @param {number} startID
|
|
7
|
+
* @param {number} endID
|
|
8
|
+
*/
|
|
9
|
+
const quickSort = (array, startID = 0, endID = array.length - 1) => {
|
|
4
10
|
const pivot = array[Math.floor((startID + endID) / 2)];
|
|
5
11
|
let left = startID;
|
|
6
12
|
let right = endID;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.now = void 0;
|
|
7
|
+
const now_1 = __importDefault(require("./now"));
|
|
8
|
+
exports.now = now_1.default;
|
|
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const getDecimalLength_1 = __importDefault(require("./getDecimalLength"));
|
|
7
7
|
const max_1 = __importDefault(require("./max"));
|
|
8
8
|
const multiplication_1 = __importDefault(require("./multiplication"));
|
|
9
|
+
/**
|
|
10
|
+
* 誤差のない足し算
|
|
11
|
+
* @param {number} x
|
|
12
|
+
* @param {number} y
|
|
13
|
+
*/
|
|
9
14
|
const addition = (x, y) => {
|
|
10
|
-
const z = Math.pow(10, (0, max_1.default)((0, getDecimalLength_1.default)(x), (0, getDecimalLength_1.default)(y)));
|
|
15
|
+
const z = Math.pow(10, (0, max_1.default)([(0, getDecimalLength_1.default)(x), (0, getDecimalLength_1.default)(y)]));
|
|
11
16
|
return ((0, multiplication_1.default)(x, z) + (0, multiplication_1.default)(y, z)) / z;
|
|
12
17
|
};
|
|
13
18
|
exports.default = addition;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* 平均値
|
|
5
|
+
* @param {number[]} numbers
|
|
6
|
+
*/
|
|
7
|
+
const average = (numbers) => {
|
|
8
|
+
const sum = numbers.reduce((a, b) => a + b, 0);
|
|
9
|
+
const avg = sum / numbers.length;
|
|
10
|
+
return avg;
|
|
11
|
+
};
|
|
12
|
+
exports.default = average;
|
|
@@ -3,27 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const addition_1 = __importDefault(require("
|
|
7
|
-
const division_1 = __importDefault(require("
|
|
8
|
-
const multiplication_1 = __importDefault(require("
|
|
9
|
-
const subtract_1 = __importDefault(require("
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
const addition_1 = __importDefault(require("../addition"));
|
|
7
|
+
const division_1 = __importDefault(require("../division"));
|
|
8
|
+
const multiplication_1 = __importDefault(require("../multiplication"));
|
|
9
|
+
const subtract_1 = __importDefault(require("../subtract"));
|
|
10
|
+
/**
|
|
11
|
+
* 電卓
|
|
12
|
+
* ()や符号に対応
|
|
13
|
+
* xなどの文字は未対応
|
|
14
|
+
* @param {string} x 計算式
|
|
15
|
+
*/
|
|
16
|
+
const calculatorCore = (x) => {
|
|
16
17
|
x = x.replace(/--/g, '+');
|
|
17
18
|
x = x.replace(/\+\+/g, '+');
|
|
18
19
|
x = x.replace(/\+-/g, '+0-');
|
|
19
20
|
x = x.replace(/\-\+/g, '+0-');
|
|
21
|
+
console.log(x);
|
|
22
|
+
console.log('====================================');
|
|
20
23
|
if (x.indexOf('(') != -1 || x.indexOf(')') != -1) {
|
|
21
24
|
const y = x.match(/\(\d+\.?(\d+)?(\*|\/|\+|\-)\d+\.?(\d+)?\)/);
|
|
22
25
|
if (y) {
|
|
23
|
-
return
|
|
26
|
+
return calculatorCore(x.replace(y[0], calculatorCore(y[0].replace(/\(|\)/g, ''))));
|
|
24
27
|
}
|
|
25
28
|
else {
|
|
26
|
-
return
|
|
29
|
+
return calculatorCore(x.replace(`(${x.slice(x.indexOf('(') + 1, x.indexOf(')'))})`, calculatorCore(x.slice(x.indexOf('(') + 1, x.indexOf(')')))));
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
else if (x.indexOf('*') != -1 || x.indexOf('/') != -1) {
|
|
@@ -35,7 +38,7 @@ const calculator = (x) => {
|
|
|
35
38
|
y[1] = y[0][0].split(/(\d+\.\d+)|(\d+)/g).filter((n) => {
|
|
36
39
|
return typeof n != 'undefined' && n != '';
|
|
37
40
|
});
|
|
38
|
-
return
|
|
41
|
+
return calculatorCore(x.replace(y[0][0], `${y[1][1] == '*'
|
|
39
42
|
? (0, multiplication_1.default)(Number(y[1][0]), Number(y[1][2]))
|
|
40
43
|
: y[1][1] == '/'
|
|
41
44
|
? (0, division_1.default)(Number(y[1][0]), Number(y[1][2]))[0]
|
|
@@ -52,7 +55,7 @@ const calculator = (x) => {
|
|
|
52
55
|
y[1] = y[0][0].split(/(\d+\.\d+)|(\d+)/g).filter((n) => {
|
|
53
56
|
return typeof n != 'undefined' && n !== '';
|
|
54
57
|
});
|
|
55
|
-
return
|
|
58
|
+
return calculatorCore(x.replace(y[0][0], `${y[1][1] == '+'
|
|
56
59
|
? (0, addition_1.default)(Number(y[1][0]), Number(y[1][2]))
|
|
57
60
|
: y[1][1] == '-'
|
|
58
61
|
? (0, subtract_1.default)(Number(y[1][0]), Number(y[1][2]))
|
|
@@ -64,4 +67,4 @@ const calculator = (x) => {
|
|
|
64
67
|
return x;
|
|
65
68
|
}
|
|
66
69
|
};
|
|
67
|
-
exports.default =
|
|
70
|
+
exports.default = calculatorCore;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = __importDefault(require("./core"));
|
|
7
|
+
const literalExpression_1 = __importDefault(require("./literalExpression"));
|
|
8
|
+
/**
|
|
9
|
+
* 電卓
|
|
10
|
+
* ()や符号に対応
|
|
11
|
+
* 一文字までの方程式に対応
|
|
12
|
+
* @param {string} x
|
|
13
|
+
*/
|
|
14
|
+
const calculator = (x) => {
|
|
15
|
+
x = x.replace(/\s+/g, '');
|
|
16
|
+
if (x.indexOf('=') != -1) {
|
|
17
|
+
return (0, literalExpression_1.default)(x);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return (0, core_1.default)(x);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
exports.default = calculator;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const division_1 = __importDefault(require("../division"));
|
|
7
|
+
const gcd_1 = __importDefault(require("../gcd"));
|
|
8
|
+
const core_1 = __importDefault(require("./core"));
|
|
9
|
+
/**
|
|
10
|
+
* @param {string} x
|
|
11
|
+
*/
|
|
12
|
+
const literalExpression = (x) => {
|
|
13
|
+
let cache = [[], ''];
|
|
14
|
+
for (const i of x.split('=')) {
|
|
15
|
+
if (/[a-zA-Z]+/.test(i) === false) {
|
|
16
|
+
cache[1] = i;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
cache[0] = i
|
|
20
|
+
.split(/([0-9]+[a-zA-Z]+)|([^a-zA-Z]+)/)
|
|
21
|
+
.filter((n) => n !== '' && typeof n != 'undefined');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (cache[0][1]) {
|
|
25
|
+
if (cache[0][1].indexOf('+') !== -1) {
|
|
26
|
+
cache[0][1] = cache[0][1].replace(/\+/g, 'plus');
|
|
27
|
+
}
|
|
28
|
+
if (cache[0][1].indexOf('-') !== -1) {
|
|
29
|
+
cache[0][1] = cache[0][1].replace(/\-/g, 'minus');
|
|
30
|
+
}
|
|
31
|
+
if (cache[0][1].indexOf('plus') !== 1) {
|
|
32
|
+
cache[0][1] = cache[0][1].replace(/plus/g, '-');
|
|
33
|
+
}
|
|
34
|
+
if (cache[0][1].indexOf('minus') !== 1) {
|
|
35
|
+
cache[0][1] = cache[0][1].replace(/minus/g, '+');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
cache[1] = cache[0][1]
|
|
39
|
+
? (0, core_1.default)(`${cache[1]}${cache[0][1]}`)
|
|
40
|
+
: (0, core_1.default)(cache[1]);
|
|
41
|
+
cache[0] = cache[0][0]
|
|
42
|
+
.split(/([0-9]+)|([a-zA-Z]+)/)
|
|
43
|
+
.filter((n) => n !== '' && typeof n != 'undefined');
|
|
44
|
+
const cacheGcd = (0, gcd_1.default)(Number(cache[0][0]), Number(cache[1]));
|
|
45
|
+
if (cacheGcd !== 1) {
|
|
46
|
+
return `${(0, division_1.default)(Number(cache[1]), cacheGcd)[0]}/${(0, division_1.default)(Number(cache[0][0]), cacheGcd)[0]}`;
|
|
47
|
+
}
|
|
48
|
+
return `${Number(cache[1])}/${Number(cache[0][0])}`;
|
|
49
|
+
};
|
|
50
|
+
exports.default = literalExpression;
|
|
@@ -4,8 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const getDecimalLength_1 = __importDefault(require("./getDecimalLength"));
|
|
7
|
+
/**
|
|
8
|
+
* 誤差のない割り算
|
|
9
|
+
* @param {number} x
|
|
10
|
+
* @param {number} y
|
|
11
|
+
*/
|
|
7
12
|
const division = (x, y) => {
|
|
8
|
-
const n =
|
|
13
|
+
const n = 10 ** ((0, getDecimalLength_1.default)(x) + (0, getDecimalLength_1.default)(y));
|
|
9
14
|
x = +(x + '').replace('.', '');
|
|
10
15
|
y = +(y + '').replace('.', '');
|
|
11
16
|
return [x / y / n, (x % y) / n];
|
|
@@ -4,10 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const valueSwap_1 = __importDefault(require("./valueSwap"));
|
|
7
|
+
/**
|
|
8
|
+
* 自然数の最大公約数
|
|
9
|
+
* @param {number} x
|
|
10
|
+
* @param {number} y
|
|
11
|
+
* @param {number} ...z
|
|
12
|
+
*/
|
|
7
13
|
const euclideanAlgorithm = (x, y, ...z) => {
|
|
8
14
|
if (x === 0 || y === 0)
|
|
9
15
|
return 0;
|
|
10
16
|
[x, y] = (0, valueSwap_1.default)(x, y);
|
|
17
|
+
/* ユークリッドの互除法 */
|
|
11
18
|
let r = y % x;
|
|
12
19
|
while (r !== 0) {
|
|
13
20
|
y = x;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* 因数分解
|
|
5
|
+
* @param {number} n
|
|
6
|
+
*/
|
|
7
|
+
const factorize = (n) => {
|
|
8
|
+
const result = [];
|
|
9
|
+
for (let i = 2; i <= n; i++) {
|
|
10
|
+
while (n % i === 0) {
|
|
11
|
+
result.push(i);
|
|
12
|
+
n /= i;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
exports.default = factorize;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const valueSwap_1 = __importDefault(require("./valueSwap"));
|
|
7
|
+
/**
|
|
8
|
+
* 自然数の最大公約数
|
|
9
|
+
* @param {number} x
|
|
10
|
+
* @param {number} y
|
|
11
|
+
* @param {number} ...z
|
|
12
|
+
*/
|
|
13
|
+
const gcd = (x, y, ...z) => {
|
|
14
|
+
if (x === 0 || y === 0)
|
|
15
|
+
return 0;
|
|
16
|
+
[x, y] = (0, valueSwap_1.default)(x, y);
|
|
17
|
+
/* ユークリッドの互除法 */
|
|
18
|
+
let r = y % x;
|
|
19
|
+
while (r !== 0) {
|
|
20
|
+
y = x;
|
|
21
|
+
x = r;
|
|
22
|
+
r = y % x;
|
|
23
|
+
}
|
|
24
|
+
if (z.length > 0) {
|
|
25
|
+
for (let i = 0; i < z.length; i++) {
|
|
26
|
+
x = gcd(x, z[i]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return x;
|
|
30
|
+
};
|
|
31
|
+
exports.default = gcd;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import addition from './addition';
|
|
2
|
+
import average from './average';
|
|
3
|
+
import calculator from './calculator';
|
|
4
|
+
import degToRad from './degToRad';
|
|
5
|
+
import division from './division';
|
|
6
|
+
import gcd from './gcd';
|
|
7
|
+
import factorial from './factorial';
|
|
8
|
+
import factorize from './factorize';
|
|
9
|
+
import getDecimalLength from './getDecimalLength';
|
|
10
|
+
import isDouble from './isDouble';
|
|
11
|
+
import isNumber from './isNumber';
|
|
12
|
+
import isPrimeNumber from './isPrimeNumber';
|
|
13
|
+
import lcm from './lcm';
|
|
14
|
+
import max from './max';
|
|
15
|
+
import min from './min';
|
|
16
|
+
import multiples from './multiples';
|
|
17
|
+
import multiplication from './multiplication';
|
|
18
|
+
import nCr from './nCr';
|
|
19
|
+
import nHr from './nHr';
|
|
20
|
+
import nPr from './nPr';
|
|
21
|
+
import primeFactorization from './primeFactorization';
|
|
22
|
+
import quotient from './quotient';
|
|
23
|
+
import radToDeg from './radToDeg';
|
|
24
|
+
import random from './random';
|
|
25
|
+
import reduce from './reduce';
|
|
26
|
+
import repeatedTrial from './repeatedTrial';
|
|
27
|
+
import standardDeviation from './standardDeviation';
|
|
28
|
+
import subtract from './subtract';
|
|
29
|
+
import toBinary from './toBinary';
|
|
30
|
+
import toCelsius from './toCelsius';
|
|
31
|
+
import toKelvin from './toKelvin';
|
|
32
|
+
import valueSwap from './valueSwap';
|
|
33
|
+
export { factorial, lcm, nCr, nHr, nPr, quotient, reduce, repeatedTrial, max, min, isDouble, isNumber, valueSwap, getDecimalLength, subtract, multiplication, addition, division, isPrimeNumber, toBinary, degToRad, radToDeg, primeFactorization, calculator, random, gcd, average, standardDeviation, factorize, multiples, toKelvin, toCelsius, };
|