Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Float's are truncated

Open
#913 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
48/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
documentation

Research direction

Start by locating the documentation for printf-style formatters and verify how %d and %o handle floating-point values. Update the relevant documentation to describe the observed truncation and available formatting behavior; treat the suggested precision syntax as a separate feature question unless the project documentation identifies an existing scope for it.

Written by the indexing model from the issue text.

Description

The %d formatter coerces any floating point number such as 0.3123 to an integer.

The documentation should mention this.

The only way I could find to print the full number is to use %o .

It would be nice to have better printf style control e.g. %d3 to print 3 sig figures.

Dominant language
JavaScript
Stars
11.5k
Forks
992
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from debug-js/debug

All issues in debug-js/debug

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.