Replace placeholder implementation of `root` to get exact cases right.
Open
bug
- Dominant language
- Swift
- Stars
- 1.9k
- Forks
- 181
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 6
Description
`print(Foundation.cbrt(1000.0)) // 10.0`
`print(Double.pow(1000.0, 1.0/3.0)) // 9.999999999999998`
Calculation through "pow" gives a different result.
Contributor guide
Research direction
Start by locating the `root` implementation and compare its results with the `Foundation.cbrt(1000.0)` and `Double.pow(1000.0, 1.0/3.0)` examples. Done means the placeholder implementation handles the exact cases described and produces the expected result rather than the differing `pow` value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100