Skip to content

chore: add number keyword to outliers in number/float64/base#13009

Draft
Planeshifter wants to merge 7 commits into
developfrom
philipp/drift-number-float64-base-2026-06-21
Draft

chore: add number keyword to outliers in number/float64/base#13009
Planeshifter wants to merge 7 commits into
developfrom
philipp/drift-number-float64-base-2026-06-21

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This pull request corrects metadata and source-style drift across seven packages in @stdlib/number/float64/base so that each outlier conforms to the prevailing convention in the namespace.

Namespace summary

  • Namespace: @stdlib/number/float64/base
  • Members analyzed: 28 (1 namespace re-export; 27 leaf packages)
  • Features with a clear majority (≥75%): package.json top-level keys, keywords membership (stdlib, double, number), lib/main.js section-marker style, lib/index.js shape, file-tree skeleton (README.md, docs/types/, examples/index.js, test/test.js).
  • Features without a clear majority (excluded): native (C/binding.gyp) presence (19/28 = 68%), ## C APIs README heading, ## Notes heading, __stdlib__ package.json field, presence of benchmark/c/native/ subdirectory.

Per outlier

number/float64/base/get-high-word, get-low-word, set-high-word, set-low-word, to-words, ulp-difference

Each is missing the bare number keyword in package.json. The keyword is present in 21/28 (75%) of siblings, including the closely related from-words, from-binary-string, to-binary-string, exponent, signbit, normalize, to-int32, to-uint32, to-int64-bytes, and from-int64-bytes. All seven packages operate on double-precision numbers and there is no semantic reason for the omission. Appended "number" to the keyword array in each.

number/float64/base/identity

Two corrections. (1) Missing number keyword, as above. (2) Missing // MAIN // section marker between the file prologue and the function JSDoc in lib/main.js. The marker is present in 26/27 (96%) of leaf siblings — identity is the lone omission, even though the file already uses the matching // EXPORTS // marker. Inserted the marker using the same one-blank-line stanza as add, mul, sub.

Validation

  • Structural-feature extraction across all 28 members (file tree, package.json/manifest.json key sets, README headings).
  • Semantic-feature scan of lib/main.js for validation prologues, error construction, and JSDoc shape — these packages have no validation prologues and a single format-based throw in from-binary-string, so no semantic drift to correct.
  • Cross-reference check confirming no test, example, or build script (tools/, _tools/scaffold/package-json/lib/validate.js, _tools/search/pkg-index/lib/create.js) is sensitive to keyword ordering or section comments.

Deliberately excluded

  • ## See Also heading absent in sub3, to-float16, to-float32, ulp-difference — auto-populated section, generator-owned.
  • identity missing top-level benchmark/c/benchmark.c / Makefile — a naive C reference benchmark for the identity function would be tautological; treated as intentional.
  • exponent, mul, sub use src/<pkg>.c instead of src/main.c — alternate-but-internally-consistent convention; renaming would cascade through manifest.json and is out of scope.
  • The assert member is a namespace re-export, structurally distinct from leaf function packages; excluded from leaf-shape drift.

Related Issues

No.

Questions

No.

Other

Generated as part of a cross-package drift-detection routine over @stdlib/number/float64/base. Majority threshold: ≥⌈28×0.75⌉ = 21. Full per-feature distribution and the corrections that were considered then dropped are recorded in the local audit log.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code as part of a scheduled cross-package drift-detection routine: structural and semantic features were extracted from every member of @stdlib/number/float64/base, the majority pattern was computed per feature, and outliers were validated by a separate review agent before any patch was applied. Each correction is mechanical (one keywords entry per package; one section-marker stanza in identity/lib/main.js).


@stdlib-js/reviewers


Generated by Claude Code

claude added 7 commits June 21, 2026 04:12
Adds the missing `number` keyword to align the package with the
prevailing convention in the `number/float64/base` namespace
(present in 21/28 (75%) of siblings).
Adds the missing `number` keyword to align the package with the
prevailing convention in the `number/float64/base` namespace
(present in 21/28 (75%) of siblings).
Adds the missing `number` keyword to align the package with the
prevailing convention in the `number/float64/base` namespace
(present in 21/28 (75%) of siblings).
Adds the missing `number` keyword to align the package with the
prevailing convention in the `number/float64/base` namespace
(present in 21/28 (75%) of siblings).
Adds the missing `number` keyword to align the package with the
prevailing convention in the `number/float64/base` namespace
(present in 21/28 (75%) of siblings).
Adds the missing `number` keyword to align the package with the
prevailing convention in the `number/float64/base` namespace
(present in 21/28 (75%) of siblings).
- Adds the missing `number` keyword (present in 21/28 (75%) of siblings
  in `number/float64/base`).
- Adds the missing `// MAIN //` section marker in `lib/main.js` (present
  in 26/27 (96%) of leaf siblings).
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
number/float64/base/get-high-word $\\color{green}215/215$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}215/215$
$\\color{green}+100.00\\%$
number/float64/base/get-low-word $\\color{green}215/215$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}215/215$
$\\color{green}+100.00\\%$
number/float64/base/identity $\\color{green}170/170$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}170/170$
$\\color{green}+100.00\\%$
number/float64/base/set-high-word $\\color{green}252/252$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}252/252$
$\\color{green}+100.00\\%$
number/float64/base/set-low-word $\\color{green}276/276$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}276/276$
$\\color{green}+100.00\\%$
number/float64/base/to-words $\\color{green}313/313$
$\\color{green}+100.00\\%$
$\\color{green}10/10$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}313/313$
$\\color{green}+100.00\\%$
number/float64/base/ulp-difference $\\color{green}266/266$
$\\color{green}+100.00\\%$
$\\color{green}28/28$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}266/266$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants