Implementation of arithmetic operators (including neg)#8
Merged
AdrianKrauss merged 6 commits intomasterfrom Nov 12, 2024
Merged
Implementation of arithmetic operators (including neg)#8AdrianKrauss merged 6 commits intomasterfrom
AdrianKrauss merged 6 commits intomasterfrom
Conversation
Draggon01
requested changes
Nov 11, 2024
Collaborator
Draggon01
left a comment
There was a problem hiding this comment.
Eher Fragen als Anmerkungen, aber vll. kannst dus dir kurz anschauen.
Draggon01
approved these changes
Nov 11, 2024
AdrianKrauss
added a commit
that referenced
this pull request
Nov 12, 2024
This reverts commit 1338d65.
Comment on lines
+1241
to
+1244
| let min ik (z,o) = | ||
| let z_cast = Size.cast ik (Ints_t.to_bigint (Ints_t.lognot z)) in | ||
| let o_cast = Size.cast ik (Ints_t.to_bigint z) in | ||
| Z.min z_cast o_cast |
Owner
There was a problem hiding this comment.
Sicher dass das funktioniert?
Angenommen wir casten in einen datentyp, der signed ist und groß genug ist.
Bei bf = ofInt(1) haben wir ja die masken ist bf = {o=1, z=-2)
Du würdest ja result = min(z, ~z) = min (-2, 1) = -2 berechnen was falsch ist.
Das gleiche problem gibts auch bei der max funktion. Oder übersehe ich was?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation of the arithmetic operations based on the following paper:
https://ieeexplore.ieee.org/abstract/document/9741267
Basic testing was conducted using the python script.