Repository navigation
refactor: remove unused module imports in constants/float16/pi-squared and constants/float16/ln-two-pi - #16745
Merged
Merged
Conversation
Removed the runtime `@stdlib/number/float64/base/to-float16` dependency and assigned the float16-exact literal `9.8671875` directly. The value is exactly representable in half-precision, so the conversion was a no-op. Every other `constants/float16` package declares its value without a conversion call (52/53, 98%), and only `ninf` and `pinf` have a `// MODULES //` section, for `@stdlib/number/ctor` (49/53 have none, 92%). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD77tffwzMPSzZL1VPAF
Removed a `// MODULES //` section that held only a leftover comment from a removed conversion import. No other `constants/float16` package has a modules section without a `require` (52/53, 98%), and 49/53 (92%) use only `// MAIN //` and `// EXPORTS //` sections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD77tffwzMPSzZL1VPAF
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
// MODULES //sections fromconstants/float16/pi-squaredandconstants/float16/ln-two-piso that both match the literal-only layout every otherconstants/float16package uses. The exported values do not change.constants/float16/pi-squaredfloat64ToFloat16( 9.8671875 )with the literal9.8671875and drops the@stdlib/number/float64/base/to-float16require. The value is already exact in half precision, so the conversion did nothing. The require was also missing frompackage.json. 52/53 (98%) of the namespace packages assign their value without a conversion call, and 49/53 (92%) have no// MODULES //section.constants/float16/ln-two-pi// MODULES //section that held only the comment// (removed conversion import; not needed for hardcoded float16 value). 52/53 (98%) of the namespace packages have no modules section without arequire.Related Issues
None.
Reference Packages
This pull request followed these packages:
constants/float16/pi,constants/float16/two-pi,constants/float16/ln-pilib/index.js(// MAIN //and// EXPORTS //only) and assigning the value as a float16-exact literal.Questions
No.
Other
Namespace summary.
constants/float16has 53 members, none autogenerated. Features analyzed: file tree,package.jsonkey sets, README section lists and order,manifest.jsonpresence, test/benchmark/example file names,lib/index.jssection layout, JSDoc tag sequence, runtime dependencies, and@typevalues. The namespace is structurally uniform: all 53 share the same base file set and the samepackage.jsonkeys. Features without a clear 75% majority were excluded: C APIs/manifest.json(15/53),@typevalue (36/53number), and README intro/notes sections.Validation. Features were extracted from the filesystem and source by script, and the candidates went through three independent review passes: semantic (intentional or not), cross-reference (whether tests, examples or docs rely on the current shape), and structural (whether the majority layout applies). All three confirmed both changes.
ninfandpinfkeep their// MODULES //sections, because they need@stdlib/number/ctor.Deliberately excluded:
@seetag. The links differ from package to package, so this is not a mechanical fix.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, as part of an automated cross-package drift-detection routine.
@stdlib-js/reviewers
Generated by Claude Code