Skip to content
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

Implement standard arithmetic methods #7

Open
2 of 3 tasks
alexmadeathing opened this issue Feb 22, 2022 · 2 comments · Fixed by #24
Open
2 of 3 tasks

Implement standard arithmetic methods #7

alexmadeathing opened this issue Feb 22, 2022 · 2 comments · Fixed by #24
Assignees
Labels
feature New feature or request

Comments

@alexmadeathing
Copy link
Owner

alexmadeathing commented Feb 22, 2022

We need all the standard arithmetic methods for dilated integers.

Citation [3] should be a useful reference for this.

  • Determine which operators are suitable for dilated integers
  • Implement operators
  • Investigate options for Mul and Div
@alexmadeathing alexmadeathing added the feature New feature or request label Feb 22, 2022
@alexmadeathing alexmadeathing self-assigned this Feb 23, 2022
@alexmadeathing
Copy link
Owner Author

So far I've only been able to implement Add, AddAssign, Sub, SubAssign.

For multiplication, the answer is non-trivial. For example:

The value 3 D8 dilated is 0x101

0x101 * 0x101 = 0x10201 which is not a format compatible with a D8 dilated integer. The carry bits do not propagate through the integer in a dilated manner.

At the moment, I'm not sure there's a simple algebraic method to solve this. An algorithmic method would work, but I definitely want to avoid that.

@alexmadeathing
Copy link
Owner Author

Rather than creating a new issue for Mul and Div, I'm reopening this one.

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

Successfully merging a pull request may close this issue.

1 participant