Post History
Abusing native number types It's common to restrict inputs, outputs, intermediate algorithm values, etc. to fit into the native number type of the language. This can be a problem for languages li...
Answer
#2: Post edited
- ## Abusing native number types
It's common to restrict inputs, outputs, intermediate algorithm values, etc. fit into the native number type of the language.- This can be a problem for languages like Boolfuck whose only integer type is the 1-bit integer. With a minimum of one bit of input and one bit of output, there exist four Boolfuck programs able to solve any decision problem by abusing the limitation.
- A program is abusing its number type if it has to be nontrivially changed in order to work for larger numbers.
- `(x << n) | (x >> (32 - n))` is allowed for bit rotations since the only thing that has to be changed for larger integers is the 32, but hard-coding a list of primes 1-128 is **not** allowed.
- ## Abusing native number types
- It's common to restrict inputs, outputs, intermediate algorithm values, etc. to fit into the native number type of the language.
- This can be a problem for languages like Boolfuck whose only integer type is the 1-bit integer. With a minimum of one bit of input and one bit of output, there exist four Boolfuck programs able to solve any decision problem by abusing the limitation.
- A program is abusing its number type if it has to be nontrivially changed in order to work for larger numbers.
- `(x << n) | (x >> (32 - n))` is allowed for bit rotations since the only thing that has to be changed for larger integers is the 32, but hard-coding a list of primes 1-128 is **not** allowed.
#1: Initial revision
## Abusing native number types It's common to restrict inputs, outputs, intermediate algorithm values, etc. fit into the native number type of the language. This can be a problem for languages like Boolfuck whose only integer type is the 1-bit integer. With a minimum of one bit of input and one bit of output, there exist four Boolfuck programs able to solve any decision problem by abusing the limitation. A program is abusing its number type if it has to be nontrivially changed in order to work for larger numbers. `(x << n) | (x >> (32 - n))` is allowed for bit rotations since the only thing that has to be changed for larger integers is the 32, but hard-coding a list of primes 1-128 is **not** allowed.