From 715614be956ef93e5f6f728997edd5ef27e10495 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Tue, 2 Jun 2026 19:47:32 -0500 Subject: [PATCH] docs: fix package-wide doc errors in two `@stdlib/math/iter` packages Two findings were not specific to the TypeScript declarations but appear consistently across each package's documentation surfaces: - `special/pow`: the summary called the operation the "exponential function", but the iterator evaluates `base^exponent` (the power function). Reword to "power function (i.e., `base` raised to the power `exponent`)" in the declaration, README, REPL help, `lib` JSDoc, and `package.json` description. The auto-generated "See Also" entries are left untouched. - `sequences/integers`: the documented default for the `iter` option was `18014398509481984`, two more than the actual default `FLOAT64_MAX_SAFE_INTEGER * 2 = 18014398509481982`. Correct it in the declaration, README, REPL help, and `lib/main.js` JSDoc. Split out from the `@stdlib/math/iter` declarations PR so the fixes can be applied consistently across all documentation surfaces. --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: passed - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../@stdlib/math/iter/sequences/integers/README.md | 2 +- .../@stdlib/math/iter/sequences/integers/docs/repl.txt | 2 +- .../math/iter/sequences/integers/docs/types/index.d.ts | 2 +- .../@stdlib/math/iter/sequences/integers/lib/main.js | 2 +- lib/node_modules/@stdlib/math/iter/special/pow/README.md | 4 ++-- lib/node_modules/@stdlib/math/iter/special/pow/docs/repl.txt | 3 ++- .../@stdlib/math/iter/special/pow/docs/types/index.d.ts | 2 +- lib/node_modules/@stdlib/math/iter/special/pow/lib/index.js | 2 +- lib/node_modules/@stdlib/math/iter/special/pow/lib/main.js | 2 +- lib/node_modules/@stdlib/math/iter/special/pow/package.json | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/node_modules/@stdlib/math/iter/sequences/integers/README.md b/lib/node_modules/@stdlib/math/iter/sequences/integers/README.md index 7829371c9073..6954a0b8a566 100644 --- a/lib/node_modules/@stdlib/math/iter/sequences/integers/README.md +++ b/lib/node_modules/@stdlib/math/iter/sequences/integers/README.md @@ -73,7 +73,7 @@ The returned iterator protocol-compliant object has the following properties: The function supports the following `options`: -- **iter**: number of iterations. Default: `18014398509481984`. +- **iter**: number of iterations. Default: `18014398509481982`. By default, the function returns a finite iterator to avoid exceeding the maximum safe double-precision floating-point integer. To adjust the number of iterations, set the `iter` option. diff --git a/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/repl.txt b/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/repl.txt index 097acefca405..8aa17b4440fa 100644 --- a/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/repl.txt @@ -11,7 +11,7 @@ Function options. options.iter: integer (optional) - Number of iterations. Default: 18014398509481984. + Number of iterations. Default: 18014398509481982. Returns ------- diff --git a/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/types/index.d.ts index 52cc9e8385ab..5fbeb2acd50a 100644 --- a/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/sequences/integers/docs/types/index.d.ts @@ -43,7 +43,7 @@ interface Options { * - If an environment supports `Symbol.iterator`, the returned iterator is iterable. * * @param options - function options -* @param options.iter - number of iterations (default: 18014398509481984) +* @param options.iter - number of iterations (default: 18014398509481982) * @throws `iter` option must be a nonnegative integer * @returns iterator * diff --git a/lib/node_modules/@stdlib/math/iter/sequences/integers/lib/main.js b/lib/node_modules/@stdlib/math/iter/sequences/integers/lib/main.js index ded19c61c73e..cf9f9ccf30e0 100644 --- a/lib/node_modules/@stdlib/math/iter/sequences/integers/lib/main.js +++ b/lib/node_modules/@stdlib/math/iter/sequences/integers/lib/main.js @@ -41,7 +41,7 @@ var MAX_ITER = FLOAT64_MAX_SAFE_INTEGER * 2; * - If an environment supports `Symbol.iterator`, the returned iterator is iterable. * * @param {Options} [options] - function options -* @param {NonNegativeInteger} [options.iter=18014398509481984] - number of iterations +* @param {NonNegativeInteger} [options.iter=18014398509481982] - number of iterations * @throws {TypeError} options argument must be an object * @throws {TypeError} must provide valid options * @returns {Iterator} iterator diff --git a/lib/node_modules/@stdlib/math/iter/special/pow/README.md b/lib/node_modules/@stdlib/math/iter/special/pow/README.md index 306dc65f5570..ab39b1c5093b 100644 --- a/lib/node_modules/@stdlib/math/iter/special/pow/README.md +++ b/lib/node_modules/@stdlib/math/iter/special/pow/README.md @@ -20,7 +20,7 @@ limitations under the License. # iterPow -> Create an [iterator][mdn-iterator-protocol] which iteratively evaluates the [exponential function][@stdlib/math/base/special/pow]. +> Create an [iterator][mdn-iterator-protocol] which iteratively evaluates the [power function][@stdlib/math/base/special/pow] (i.e., `base` raised to the power `exponent`). @@ -42,7 +42,7 @@ var iterPow = require( '@stdlib/math/iter/special/pow' ); #### iterPow( base, exponent ) -Returns an [iterator][mdn-iterator-protocol] which iteratively evaluates the [exponential function][@stdlib/math/base/special/pow]. +Returns an [iterator][mdn-iterator-protocol] which iteratively evaluates the [power function][@stdlib/math/base/special/pow] (i.e., `base` raised to the power `exponent`). ```javascript var array2iterator = require( '@stdlib/array/to-iterator' ); diff --git a/lib/node_modules/@stdlib/math/iter/special/pow/docs/repl.txt b/lib/node_modules/@stdlib/math/iter/special/pow/docs/repl.txt index 8e2c3db7d428..891c5fffcc97 100644 --- a/lib/node_modules/@stdlib/math/iter/special/pow/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/iter/special/pow/docs/repl.txt @@ -1,6 +1,7 @@ {{alias}}( base, exponent ) - Returns an iterator which iteratively evaluates the exponential function. + Returns an iterator which iteratively evaluates the power function (i.e., + `base` raised to the power `exponent`). The length of the returned iterator is equal to the length of the shortest provided iterator. In other words, the returned iterator ends once *one* of diff --git a/lib/node_modules/@stdlib/math/iter/special/pow/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/iter/special/pow/docs/types/index.d.ts index 1301fa6e095c..adae1c30ae35 100644 --- a/lib/node_modules/@stdlib/math/iter/special/pow/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/iter/special/pow/docs/types/index.d.ts @@ -26,7 +26,7 @@ import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter'; type Iterator = Iter | IterableIterator; /** -* Returns an iterator which iteratively evaluates the exponential function. +* Returns an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`). * * ## Notes * diff --git a/lib/node_modules/@stdlib/math/iter/special/pow/lib/index.js b/lib/node_modules/@stdlib/math/iter/special/pow/lib/index.js index 5ed71d2a8969..814a01607f12 100644 --- a/lib/node_modules/@stdlib/math/iter/special/pow/lib/index.js +++ b/lib/node_modules/@stdlib/math/iter/special/pow/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* Create an iterator which iteratively evaluates the exponential function. +* Create an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`). * * @module @stdlib/math/iter/special/pow * diff --git a/lib/node_modules/@stdlib/math/iter/special/pow/lib/main.js b/lib/node_modules/@stdlib/math/iter/special/pow/lib/main.js index 47bc2a3fb3e7..20092eaf380c 100644 --- a/lib/node_modules/@stdlib/math/iter/special/pow/lib/main.js +++ b/lib/node_modules/@stdlib/math/iter/special/pow/lib/main.js @@ -27,7 +27,7 @@ var pow = require( '@stdlib/math/base/special/pow' ); // MAIN // /** -* Returns an iterator which iteratively evaluates the exponential function. +* Returns an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`). * * ## Notes * diff --git a/lib/node_modules/@stdlib/math/iter/special/pow/package.json b/lib/node_modules/@stdlib/math/iter/special/pow/package.json index a46ca56286c7..1857413af020 100644 --- a/lib/node_modules/@stdlib/math/iter/special/pow/package.json +++ b/lib/node_modules/@stdlib/math/iter/special/pow/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/math/iter/special/pow", "version": "0.0.0", - "description": "Create an iterator which evaluates the exponential function.", + "description": "Create an iterator which evaluates the power function (i.e., `base` raised to the power `exponent`).", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors",