ruby / ruby/bigdecimal

Clarify how the initial value is converted down to the given number of significant digits in Kernel.BigDecimal

Open
#165 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
152
Forks
95
Avg merge
4d 1h
Merged PRs (30d)
10

Description

The digits parameter of Kernel#BigDecimal is documented like this:

The number of significant digits, as an Integer. If omitted or 0, the number of significant digits is determined from the initial value.

However, it’s not specified how the initial value is converted down to the given number of significant digits in Kernel.BigDecimal. It seems like the value is rounded (instead of truncated, floored or ceiled), but it’s not clear from the documentation.

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.

Research direction

Start with the documentation for Kernel#BigDecimal and inspect the existing description of its digits parameter. Confirm how the initial value is converted to the requested number of significant digits, then update the documentation to state that behavior clearly; done means the rounding or other conversion rule is explicit.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.