The doc for
__quantum__rt__bigint_shiftleft and
__quantum__rt__bigint_shiftright says:
"Returns the big integer arithmetically shifted .. by the (positive) integer amount of bits."
The doc does not say what will happen if the amount of bits (the second parameter) is negative.
Consider making the second param an unsigned type (u8 can be sufficient), such that the questions, like the one above, do not arise.
Also the fragment "(positive) integer amount of bits" tells me that the amount of bits (the second parameter) can not be zero. At least in Russian-language mathematics the word "positive" means "greater than zero", and the concept of "zero or greater" is expressed with the words "non-negative".
If the amount of bits (the second parameter):
can be zero then consider replacing the fragment "(positive)" with "(non-negative)" or "(zero or greater)";
cannot be zero then consider replacing the fragment "(positive)" with "(greater than zero)".
The doc for
__quantum__rt__bigint_shiftleftand__quantum__rt__bigint_shiftrightsays:"Returns the big integer arithmetically shifted .. by the (positive) integer amount of bits."
The doc does not say what will happen if the amount of bits (the second parameter) is negative.
Consider making the second param an unsigned type (
u8can be sufficient), such that the questions, like the one above, do not arise.Also the fragment "(positive) integer amount of bits" tells me that the amount of bits (the second parameter) can not be zero. At least in Russian-language mathematics the word "positive" means "greater than zero", and the concept of "zero or greater" is expressed with the words "non-negative".
If the amount of bits (the second parameter):
can be zero then consider replacing the fragment "(positive)" with "(non-negative)" or "(zero or greater)";
cannot be zero then consider replacing the fragment "(positive)" with "(greater than zero)".