Skip to content

Add Int–Real Mixed Arithmetic Operations #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mehrad31415
Copy link
Contributor

Add Mixed Int–Real Arithmetic Operations with Operator Overloading

Implemented mixed IntReal overloads for the following operations:

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Exponentiation (pow)

For each operation, both Int op Real and Real op Int are supported, with all ownership combinations (by reference and by value). The result is always a Real<'ctx> node.

@toolCHAINZ toolCHAINZ added the enhancement New feature or request label Aug 18, 2025
@toolCHAINZ
Copy link
Member

I'll look over this, but I will likely want to go another way with these impls to follow the pattern introduced in #410. I think this could all be done fairly simply with some Add<IntoAst<Real>> style impls in that PR. After that's merged, I'll look into this, but might end up changing it a good bit/doing it in its own branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants