modular / modular/modular

[BUG] Unnecessary complex API

Open
#2,257 6 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.