diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/gcd/docs/repl.txt index 4e90a0d82d8..79e22abd3e7 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/base/special/gcd/docs/repl.txt @@ -10,10 +10,10 @@ Parameters ---------- a: integer - First integer. + First number. b: integer - Second integer. + Second number. Returns ------- diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/gcd/docs/types/index.d.ts index 826fe023ca6..fc755a119fd 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/gcd/docs/types/index.d.ts @@ -26,8 +26,8 @@ * - If both `a` and `b` are `0`, the function returns `0`. * - Both `a` and `b` must have integer values; otherwise, the function returns `NaN`. * -* @param a - integer -* @param b - integer +* @param a - first number +* @param b - second number * @returns greatest common divisor * * @example diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/lib/binary_gcd.js b/lib/node_modules/@stdlib/math/base/special/gcd/lib/binary_gcd.js index ec498d96cb1..ff4303320b7 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/lib/binary_gcd.js +++ b/lib/node_modules/@stdlib/math/base/special/gcd/lib/binary_gcd.js @@ -28,8 +28,8 @@ * [@stein:1967]: https://doi.org/10.1016/0021-9991(67)90047-2 * * @private -* @param {integer} a - integer -* @param {integer} b - integer +* @param {integer} a - first number +* @param {integer} b - second number * @returns {integer} greatest common divisor * * @example diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/lib/bitwise_binary_gcd.js b/lib/node_modules/@stdlib/math/base/special/gcd/lib/bitwise_binary_gcd.js index a04fd8da5c8..dba6d12e8e9 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/lib/bitwise_binary_gcd.js +++ b/lib/node_modules/@stdlib/math/base/special/gcd/lib/bitwise_binary_gcd.js @@ -28,8 +28,8 @@ * [@stein:1967]: https://doi.org/10.1016/0021-9991(67)90047-2 * * @private -* @param {integer32} a - integer -* @param {integer32} b - integer +* @param {integer32} a - first number +* @param {integer32} b - second number * @returns {integer32} greatest common divisor * * @example diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/lib/main.js b/lib/node_modules/@stdlib/math/base/special/gcd/lib/main.js index cffd6675933..00167533e9e 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/gcd/lib/main.js @@ -34,8 +34,8 @@ var largeIntegers = require( './binary_gcd.js' ); /** * Computes the greatest common divisor (gcd). * -* @param {integer} a - integer -* @param {integer} b - integer +* @param {integer} a - first number +* @param {integer} b - second number * @returns {integer} greatest common divisor * * @example diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/lib/native.js b/lib/node_modules/@stdlib/math/base/special/gcd/lib/native.js index fdfd7bca656..9f468395f9a 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/lib/native.js +++ b/lib/node_modules/@stdlib/math/base/special/gcd/lib/native.js @@ -29,9 +29,9 @@ var addon = require( './../src/addon.node' ); * Computes the greatest common divisor (gcd). * * @private -* @param {number} a - input value -* @param {number} b - input value -* @returns {number} function value +* @param {number} a - first number +* @param {number} b - second number +* @returns {number} greatest common divisor * * @example * var v = gcd( 0.0, 0.0 ); diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/package.json b/lib/node_modules/@stdlib/math/base/special/gcd/package.json index 3b85a936e49..76686a39195 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/package.json +++ b/lib/node_modules/@stdlib/math/base/special/gcd/package.json @@ -71,5 +71,129 @@ "gcm", "arithmetic", "integer" - ] + ], + "__stdlib__": { + "scaffold": { + "$schema": "math/base@v1.0", + "base_alias": "gcd", + "alias": "gcd", + "pkg_desc": "compute the greatest common divisor (gcd)", + "desc": "computes the greatest common divisor (gcd)", + "short_desc": "greatest common divisor (gcd)", + "parameters": [ + { + "name": "a", + "desc": "first number", + "type": { + "javascript": "integer", + "jsdoc": "integer", + "c": "double", + "dtype": "float64" + }, + "domain": [ + { + "min": "-infinity", + "max": "infinity" + } + ], + "rand": { + "prng": "random/base/discrete-uniform", + "parameters": [ + 0.0, + 50.0 + ] + }, + "example_values": [ + 1.0, + 2.0, + 4.0, + 5.0, + 9.0, + 10.0, + 15.0, + 20.0, + 21.0, + 25.0, + 28.0, + 30.0, + 33.0, + 35.0, + 39.0, + 40.0, + 42.0, + 45.0, + 48.0, + 50.0 + ] + }, + { + "name": "b", + "desc": "second number", + "type": { + "javascript": "integer", + "jsdoc": "integer", + "c": "double", + "dtype": "float64" + }, + "domain": [ + { + "min": "-infinity", + "max": "infinity" + } + ], + "rand": { + "prng": "random/base/discrete-uniform", + "parameters": [ + 0.0, + 50.0 + ] + }, + "example_values": [ + 1.0, + 2.0, + 4.0, + 5.0, + 9.0, + 10.0, + 15.0, + 20.0, + 21.0, + 25.0, + 28.0, + 30.0, + 33.0, + 35.0, + 39.0, + 40.0, + 42.0, + 45.0, + 48.0, + 50.0 + ] + } + ], + "returns": { + "desc": "greatest common divisor", + "type": { + "javascript": "number", + "jsdoc": "number", + "c": "double", + "dtype": "float64" + } + }, + "keywords": [ + "binary gcd", + "greatest common divisor", + "greatest common factor", + "highest common factor", + "greatest common measure", + "highest common divisor", + "gcd", + "gcf", + "hcf", + "gcm" + ], + "extra_keywords": [] + } + } } diff --git a/lib/node_modules/@stdlib/math/base/special/gcd/src/main.c b/lib/node_modules/@stdlib/math/base/special/gcd/src/main.c index 81bcd3351de..f1292f0c0ea 100644 --- a/lib/node_modules/@stdlib/math/base/special/gcd/src/main.c +++ b/lib/node_modules/@stdlib/math/base/special/gcd/src/main.c @@ -30,9 +30,9 @@ static const int64_t STDLIB_CONSTANT_INT64_MAX = 9223372036854775807; /** * Computes the greatest common divisor (gcd) using the binary GCD algorithm. * -* @param a input value -* @param b input value -* @return output value +* @param a first number +* @param b second number +* @return greatest common divisor * * @example * double out = largeIntegers( 1.2676506002282294.0e+30, 9007199254740992.0 ); @@ -86,9 +86,9 @@ static double largeIntegers( const double a, const double b ) { /** * Computes the greatest common divisor (gcd) using the binary GCD algorithm and bitwise operations. * -* @param a input value -* @param b input value -* @return output value +* @param a first number +* @param b second number +* @return greatest common divisor * * @example * double out = bitwise( 48.0, 18.0 ); @@ -142,9 +142,9 @@ static double bitwise( const double a, const double b ) { /** * Computes the greatest common divisor (gcd). * -* @param a input value -* @param b input value -* @return output value +* @param a first number +* @param b second number +* @return greatest common divisor * * @example * double out = stdlib_base_gcd( 48.0, 18.0 );