Skip to content

chore: correct float64 keyword leftovers in @stdlib/constants/float32 packages#11964

Open
Planeshifter wants to merge 3 commits intodevelopfrom
claude/inspiring-curie-1nRCz
Open

chore: correct float64 keyword leftovers in @stdlib/constants/float32 packages#11964
Planeshifter wants to merge 3 commits intodevelopfrom
claude/inspiring-curie-1nRCz

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • Corrects float64-namespace keyword tokens that leaked into three @stdlib/constants/float32 packages, restoring keyword consistency with the rest of the namespace.

Namespace summary

  • Namespace: @stdlib/constants/float32 (68 non-autogenerated members).
  • Features analyzed: package file tree, package.json shape, manifest.json shape, README section list, package.json keyword arrays, lib/index.js JSDoc tag presence, source-level dependencies.
  • Features with a clear majority (≥75%): file tree (100%), package.json top-level key set (100%), manifest.json shape (100%), @type/@constant/@default/@module/@example JSDoc tag presence (100%), keyword float (87%), mathematics (84%), math (84%), float32 (82%).
  • Features without a clear majority (excluded): README section ordering (See Also is auto-populated and present in only 69%), @see tag in the constant block (82% but absence is consistent with the float64 sibling for every outlier — intentional), keyword single/single-precision (44%), keyword flt (19%).

Per outlier package

@stdlib/constants/float32/gamma-lanczos-g

The keyword array was copied verbatim from the float64 sibling, leaving "float64", "64bit", and "64-bit" in a package that exports the float32-quantized Lanczos approximation constant (1.42845618724823). Among the 12 float32 packages with precision-specific keyword tokens, this was the sole outlier — 11 of 12 siblings carry correctly localized tokens. Replaced the three erroneous tokens with their float32 equivalents to restore consistency with namespace conventions.

@stdlib/constants/float32/fourth-root-eps

The keywords array contained "dbl", a stale copy-paste artifact from the float64 sibling. No other float32 constant package in the namespace retains this keyword; the correct abbreviation is "flt", consistent with 13 existing float32 packages. Replace "dbl" with "flt" to restore keyword conformance across the float32 constants namespace.

@stdlib/constants/float32/num-significand-bits

Removes an erroneous "64bit" keyword from the package metadata. The package exports 23, the number of significand bits in an IEEE 754 single-precision (32-bit) float, and was the sole remaining float32 constant carrying a "64bit" tag after prior cleanup. Replaces "64bit" with "32bit" to match the sibling num-exponent-bits package and align with the documented single-precision semantics.

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Validation

  • Structural extraction across all 68 packages: file trees, package.json and manifest.json shapes, README headings, test/example/benchmark filenames, and keyword arrays.
  • Semantic feature extraction was reduced to JSDoc tag presence and source-level dependency analysis since every member of this namespace is a value-export package (no public function signature, validation prologue, or error-construction surface to inspect).
  • Three-agent drift validation (semantic-review, cross-reference, structural-review) confirmed each fix as confirmed-drift with no test or example dependence on the keyword strings.
  • Deliberately excluded: keyword absences that mirror the float64 sibling (e.g., 11 packages missing mathematics/math are integer-bound max/min/factorial/Fibonacci constants whose float64 siblings also omit those tokens; 9 packages missing float, all consistent with float64); the auto-populated ## See Also README section (gated); @see JSDoc-tag absences that match the float64 sibling for every outlier; keyword flt (no clear majority — 19% — so absence is not drift, only its presence as a leftover from dbl is).

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of 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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was written by Claude Code as part of an automated cross-package API drift detection routine. The routine extracted structural and semantic features from every package in the @stdlib/constants/float32 namespace, identified majority patterns, flagged outliers, and ran a three-agent validation pass (semantic-review, cross-reference, structural-review) before applying any fix. Each correction is a mechanical keyword swap in package.json only — no source, test, or example files were touched.


@stdlib-js/reviewers


Generated by Claude Code

claude added 3 commits May 6, 2026 08:18
Replace `float64`, `64bit`, and `64-bit` keywords with `float32`,
`32bit`, and `32-bit`. Keyword array was previously identical to the
float64 sibling (no localization performed when the package was
introduced); package itself returns the float32-quantized value.
…/fourth-root-eps`

The float32 package retained the `dbl` (double abbreviation) keyword
from its float64 sibling; replace with the corresponding float32
abbreviation `flt`.
…at32/num-significand-bits`

Package returns the number of significand bits in single-precision
(23) and is in the float32 namespace, but its keyword array contained
`64bit` alongside `float32`. Replace with `32bit` so the keywords
match the package's actual precision.
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float32/fourth-root-eps $\color{green}53/53$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}0/0$
$\color{green}+100.00%$
$\color{green}53/53$
$\color{green}+100.00%$
constants/float32/gamma-lanczos-g $\color{green}52/52$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}0/0$
$\color{green}+100.00%$
$\color{green}52/52$
$\color{green}+100.00%$
constants/float32/num-significand-bits $\color{green}47/47$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}0/0$
$\color{green}+100.00%$
$\color{green}47/47$
$\color{green}+100.00%$

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

@Planeshifter Planeshifter marked this pull request as ready for review May 6, 2026 14:19
@Planeshifter Planeshifter requested review from a team and kgryte May 6, 2026 14:19
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants