Repository navigation
docs: fix truncating format specifiers in math/base/* examples - #16734
Merged
Merged
Conversation
Propagates fix from c62ed72 ("docs: clean-up") to sibling packages whose `logEachMap` examples print non-integer values using `%d`, which `string/format` truncates to an integer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD79FxccmCVj6eLT63Lk
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
marked this pull request as ready for review
November 21, 2026 23:35
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:
developbetween 2026-11-19 and 2026-11-20 to sibling packages.%dwith%0.4ffor non-integer values inlogEachMapexamples.string/formattruncates%dto an integer, sofloor2( 0.3 )prints0instead of0.2500, andsincospif( -0.5 )is labeledsincospif(0). Affected packages (README andexamples/index.js):math/base/special/floor2(output)math/base/special/floor10(output)math/base/tools/chebyshev-series(input and output)math/base/special/fresnelf(input)math/base/special/sincospif(input)Related Issues
None.
Reference Packages
This pull request followed these packages:
number/float64/base/divmath/base/special/ceil2%0.4ffor non-integer values inlogEachMapformat strings.floor2andfloor10now matchceil2,round2,trunc2,ceil10,round10, andtrunc10.chebyshev-series,fresnelf, andsincospif, the inputs are drawn fromrandom/array/uniform, so the input specifier is also changed.Questions
No.
Other
Validation: candidate sites came from searching all
logEachMap/logEachformat strings that use%dinexamples/index.jsand READMEs, then checking the random generator and the function's range at each one. Two independent validation passes read every file in full and ran each example to see the truncated output. An adaptation pass and a style-consistency pass checked the patches against sibling packages. Every site was confirmed by all four passes.Excluded:
console.log( '...%d...' )sites (e.g.,ceilb,floorn, thechebyshev-seriesdirect-evaluation loop), because Node'sutil.formatdoes not truncate%d.stats/base/dists/planck/cdf%04f. This is a different defect (zero-padded width, not precision).throw error→console.error( error.message )JSDoc change in c62ed72. It is stylistic, not a defect, and has about 200 sites.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 fix-propagation routine.
@stdlib-js/reviewers
Generated by Claude Code