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!

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.

1 participant