Interesting cases to be covered in test262
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 58
- Forks
- 12
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 2
Description
This issue exists to collect test cases for eventual propagation into test262.
- converting 5 inches to feet should produce a result with a numeric value exactly equal to
5 * (1/12)(0.41666666666666663) (https://github.com/tc39/proposal-amount/pull/89#discussion_r3046183316 ) - converting 18 inches to feet should produce a result of exactly 1.5 (https://github.com/tc39/proposal-amount/pull/89#discussion_r3046027281 )
- converting 100°C to Fahrenheit should produce a result of exactly 212 (https://github.com/tc39/proposal-amount/pull/89#pullrequestreview-4023855134 )
- converting 80063993375475600°C to Fahrenheit exposes inner details of Number conversion and arithmetic—using mathematical value arithmetic with a single final conversion to Number produces 144115188075856128𝔽[^1], while converting operands to Numbers and then using IEEE 754 operations produces 144115188075856096𝔽[^2] (https://github.com/tc39/proposal-amount/pull/89#pullrequestreview-4023855134 )
[^1]: 𝔽(80063993375475600 × (1 ÷ 5⁄9) + (273.15 − 2298.35÷9)÷5⁄9) = 𝔽(144115188075856112) = 144115188075856128𝔽
[^2]: 𝔽(80063993375475600) * 𝔽(1 ÷ 5⁄9) + 𝔽(273.15 − 2298.35÷9)÷5⁄9) = 𝔽(80063993375475600) * 𝔽(1.8) + 𝔽(32) = 𝔽(144115188075856080) + 𝔽(32) = 𝔽(144115188075856064) + 𝔽(32) = 144115188075856096𝔽
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked proposal PR discussions and the test262 conventions for measurement conversions and exact numeric assertions. The work is done when the four listed inch and temperature conversion cases are represented in test262 with the specified results, including the large-value rounding behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100