Skip to content

docs: rename E -> FLOAT32_E in @stdlib/constants/float32/e#13469

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/drift-constants-float32-2026-07-14
Draft

docs: rename E -> FLOAT32_E in @stdlib/constants/float32/e#13469
Planeshifter wants to merge 1 commit into
developfrom
philipp/drift-constants-float32-2026-07-14

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

Renames the internal identifier E -> FLOAT32_E in @stdlib/constants/float32/e to match the namespace's FLOAT32_<NAME> naming convention. Same class of drift and same fix as PR #12432 applied to the sibling nan package.

Namespace summary

  • Namespace: @stdlib/constants/float32 — 68 packages (all non-autogenerated).
  • Features analyzed: file tree, package.json top-level / scripts / stdlib keys, manifest.json shape, README section list, and — via per-package agent — the exported constant's identifier across source, TypeScript declarations, examples, tests, and README headings.
  • Features with clear majority (≥75%): all structural features are 100% conformant across the namespace, and the FLOAT32_<NAME> identifier convention holds in 65 of 68 packages (95.6%).
  • Features excluded for lack of clear majority: the README See Also section (present in 67.6% of packages — below the 75% threshold; also gated as an auto-populated section).

Outlier

@stdlib/constants/float32/e

Renamed the exported identifier from E to FLOAT32_E across lib/index.js, docs/types/index.d.ts, docs/types/test.ts, examples/index.js, test/test.js, and README.md to match the namespace's FLOAT32_<NAME> convention (95.6% of siblings already conform). Same drift, same fix as nan in #12432. No behavioral change — the lib/index.js @example line and namespace/pkg2alias/data.csv already documented the public alias as FLOAT32_E.

Related Issues

None.

Questions

No.

Other

Validation

  • Structural extraction: file trees, package.json and manifest.json shapes, and README section lists compared across all 68 packages via filesystem walk.
  • Semantic extraction: per-package identifier survey across lib/index.js, examples, tests, docs, and README to isolate the naming-convention outlier.
  • Three-agent drift validation: an opus semantic-review pass confirmed the deviation is a legacy artifact of the package's origin as a copy of constants/float64/e (whose namespace convention is unprefixed) and not an intentional preservation of the mathematical symbol; an opus cross-reference pass confirmed no consumer accesses the constant by a property name and no test relies on the local binding name; a sonnet structural pass enumerated the specific line changes required and the tokens that must not be touched (mathematical _e_ link, Euler, EXPORTS/MAIN banners, URL-encoded E_%28...%29, C macro STDLIB_CONSTANT_FLOAT32_E, path strings).

Deliberately excluded:

  • ninf and pinf, which use a local v binding in lib/index.js for the ArrayBuffer bit-pattern trick but publicly export FLOAT32_NINF / FLOAT32_PINF — a legitimate implementation shape, not drift.
  • README See Also section presence / absence (auto-populated, and below the 75% majority threshold).
  • @see link absences in 12 packages — non-mechanical; adding requires domain-specific reference selection.

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 on behalf of @Planeshifter as an automated cross-package drift-detection run over a randomly-selected stdlib namespace. The namespace constants/float32 was picked at random; structural and semantic features were extracted across all 68 packages; the sole naming-convention outlier was validated by three independent reviewer agents (two opus, one sonnet) before the identifier rename was applied in the primary worktree. A human will audit and promote the PR out of draft.


@stdlib-js/reviewers


Generated by Claude Code

The `@stdlib/constants/float32/*` namespace uses a `FLOAT32_<NAME>`
identifier convention consistently across README headings, `lib/index.js`
variable declarations, TypeScript declarations, example scripts, and
tests: 65 of 68 sibling packages (95.6%) conform. The `e` package was
the sole outlier, using bare `E` throughout, having been ported from
`constants/float64/e` where the namespace convention is unprefixed and
never re-aligned. This mirrors the drift PR #12432 corrected in the
sibling `nan` package (README heading `# NAN` -> `# FLOAT32_NAN`).

Renames the internal identifier in `README.md`, `lib/index.js`,
`docs/types/index.d.ts`, `docs/types/test.ts`, `examples/index.js`, and
`test/test.js`. The exported numeric value is unchanged; `require(...)`
consumers observe no difference (the exported binding was already
publicly documented as `FLOAT32_E` via the `lib/index.js` `@example`
line and via `namespace/pkg2alias/data.csv`).
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
constants/float32/e $\\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\\%$

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