Skip to content

__quantum__rt__bigint_shift{left,right}: Consider adding details #29

Description

@kuzminrobin

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)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions