Skip to content

Conversation

@orejevich
Copy link

@orejevich orejevich commented Apr 26, 2025

This PR adds proper handling of comptime_float and comptime_int to std.math.pow and std.math.powi.

Changes:

  • pow now supports comptime_float by internally casting to f128 during computation
  • powi now supports comptime_int directly, with manual overflow and underflow checks
  • Matches existing behavior for runtime types, including special cases like 0^0 and negative exponents

Testing:

  • Added new tests for comptime_int and comptime_float
  • Verified all local tests pass for modified files

Let me know if anything should be adjusted — happy to tweak if needed!

@andrewrk
Copy link
Member

This pull request is not ready for review because:

  • It has conflicts that must be resolved via rebasing against latest origin/master.
  • It is not passing the CI tests.

Closing since there has been no activity for 30+ days.

@andrewrk andrewrk closed this Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants