Skip to content

Commit 715614b

Browse files
committed
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 ---
1 parent 34f9bab commit 715614b

10 files changed

Lines changed: 12 additions & 11 deletions

File tree

lib/node_modules/@stdlib/math/iter/sequences/integers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The returned iterator protocol-compliant object has the following properties:
7373

7474
The function supports the following `options`:
7575

76-
- **iter**: number of iterations. Default: `18014398509481984`.
76+
- **iter**: number of iterations. Default: `18014398509481982`.
7777

7878
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.
7979

lib/node_modules/@stdlib/math/iter/sequences/integers/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Function options.
1212

1313
options.iter: integer (optional)
14-
Number of iterations. Default: 18014398509481984.
14+
Number of iterations. Default: 18014398509481982.
1515

1616
Returns
1717
-------

lib/node_modules/@stdlib/math/iter/sequences/integers/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface Options {
4343
* - If an environment supports `Symbol.iterator`, the returned iterator is iterable.
4444
*
4545
* @param options - function options
46-
* @param options.iter - number of iterations (default: 18014398509481984)
46+
* @param options.iter - number of iterations (default: 18014398509481982)
4747
* @throws `iter` option must be a nonnegative integer
4848
* @returns iterator
4949
*

lib/node_modules/@stdlib/math/iter/sequences/integers/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var MAX_ITER = FLOAT64_MAX_SAFE_INTEGER * 2;
4141
* - If an environment supports `Symbol.iterator`, the returned iterator is iterable.
4242
*
4343
* @param {Options} [options] - function options
44-
* @param {NonNegativeInteger} [options.iter=18014398509481984] - number of iterations
44+
* @param {NonNegativeInteger} [options.iter=18014398509481982] - number of iterations
4545
* @throws {TypeError} options argument must be an object
4646
* @throws {TypeError} must provide valid options
4747
* @returns {Iterator} iterator

lib/node_modules/@stdlib/math/iter/special/pow/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# iterPow
2222

23-
> Create an [iterator][mdn-iterator-protocol] which iteratively evaluates the [exponential function][@stdlib/math/base/special/pow].
23+
> 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`).
2424
2525
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
2626

@@ -42,7 +42,7 @@ var iterPow = require( '@stdlib/math/iter/special/pow' );
4242

4343
#### iterPow( base, exponent )
4444

45-
Returns an [iterator][mdn-iterator-protocol] which iteratively evaluates the [exponential function][@stdlib/math/base/special/pow].
45+
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`).
4646

4747
```javascript
4848
var array2iterator = require( '@stdlib/array/to-iterator' );

lib/node_modules/@stdlib/math/iter/special/pow/docs/repl.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
{{alias}}( base, exponent )
3-
Returns an iterator which iteratively evaluates the exponential function.
3+
Returns an iterator which iteratively evaluates the power function (i.e.,
4+
`base` raised to the power `exponent`).
45

56
The length of the returned iterator is equal to the length of the shortest
67
provided iterator. In other words, the returned iterator ends once *one* of

lib/node_modules/@stdlib/math/iter/special/pow/docs/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter';
2626
type Iterator = Iter | IterableIterator;
2727

2828
/**
29-
* Returns an iterator which iteratively evaluates the exponential function.
29+
* Returns an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`).
3030
*
3131
* ## Notes
3232
*

lib/node_modules/@stdlib/math/iter/special/pow/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
'use strict';
2020

2121
/**
22-
* Create an iterator which iteratively evaluates the exponential function.
22+
* Create an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`).
2323
*
2424
* @module @stdlib/math/iter/special/pow
2525
*

lib/node_modules/@stdlib/math/iter/special/pow/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var pow = require( '@stdlib/math/base/special/pow' );
2727
// MAIN //
2828

2929
/**
30-
* Returns an iterator which iteratively evaluates the exponential function.
30+
* Returns an iterator which iteratively evaluates the power function (i.e., `base` raised to the power `exponent`).
3131
*
3232
* ## Notes
3333
*

lib/node_modules/@stdlib/math/iter/special/pow/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@stdlib/math/iter/special/pow",
33
"version": "0.0.0",
4-
"description": "Create an iterator which evaluates the exponential function.",
4+
"description": "Create an iterator which evaluates the power function (i.e., `base` raised to the power `exponent`).",
55
"license": "Apache-2.0",
66
"author": {
77
"name": "The Stdlib Authors",

0 commit comments

Comments
 (0)