Open 3commascapital opened 3 months ago
I think the main thing to discuss is the coerceMathOperations
variable. currently i am hard coding it. however, this could be turned into some sort of strategy configuration from the user. I am thinking about the following for this input:
HEX
: show all numbers as hex dataABS
: get all of the matching permutations in checkOperation2
, sort by the deviation from zero, preferencing non negative numbers, use the lowest oneUINT
: show all numbers as uint, don't care about intsany thoughts @zemse ?
Sorry for the delay, I'll try to review this sooner.
These changes print out math opcodes that take 2 inputs and push its result to the top of the stack. The list of operators and appropriate typing can be found in math2.ts. I found that it was a cleaner diff to break the switch pattern being used in opcodes/index.ts but I am willing to use it if required. I plan to add the 3 input opcodes as well. Happy to do these changes in pieces if desired.