Function proposal: not(x;y)

Create issue
Issue #1016 new
Former user created an issue

I made an user function that I think could be useful:

neg(x;y) = hex(mask(min(-x;x);8))

Without it, I had to use windows calculator when I had a signed value for something I knew was supposed to be unsigned.

I also made this:

not_hex(x;y) = hex(mask(mod(not(x);2^y);y))

But didn't test it as much, so not sure how good it is.

Comments (1)

  1. Pol Welter

    What exactly would this be useful for? I fail to see what you are trying to achieve. For one, the first function discards the y argument. Secondly, it also only applies to 8-bit values.

  2. Log in to comment