tc39 / tc39/proposal-amount

Retain numeric types across convertTo operations

Open
#91 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
58
Forks
12
Avg merge
2h 35m
Merged PRs (30d)
2

Description

If you start with a Number Amount, it doesn't seem right to pull a precision out of thin air during convertTo and return it as a IntlMV Amount. You should get back another Number Amount that contains the raw result of a floating point arithmetic operation.

If you started with a IntlMV Amount, then you should get back another IntlMV Amount while retaining precision according to #82.

In other words, the only operation that should transfer you from a floating-point Number to an IntlMV is when setting maximum significant or fraction digits (with a rounding mode), not unit conversion.

Contributor guide

Open the contributing guide

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 by reading the convertTo operation described in this issue and the precision requirements in issue #82. Determine how Number and IntlMV Amount values currently flow through conversion; done means Number inputs retain raw floating-point results, IntlMV inputs retain precision, and only rounding-related settings transfer types.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.