[BUG] Unnecessary complex API
Open
Nobody has claimed this yet.
bug
mojo
mojo-repo
- Dominant language
- Mojo
- Stars
- 29.8k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Bug description
Take math.inf. It's defined as:
inf[type: DType]() -> SIMD[type, 1]
why not just:
inf[type: DType]() -> type
?
Steps to reproduce
- Include relevant code snippet or link to code that did not work as expected.
- If applicable, add screenshots to help explain the problem.
- If using the Playground, name the pre-existing notebook that failed and the steps that led to failure.
- Include anything else that might help us debug the issue.
System information
Latest mojo
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 with the math.inf definition shown in the issue and locate its implementation in the latest Mojo source. Compare the SIMD[type, 1] and type return signatures, then verify the intended behavior with the relevant tests; the payload names no file or test, so finding those entry points is part of the work.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100