Operator >>
does arithmetic or logical shift, depending on rhs
#6201
Labels
bug
Something isn't working
>>
does arithmetic or logical shift, depending on rhs
#6201
Aim
Attempted to create a simple program which right-shifts a number.
The following
main.nr
:with
Prover.toml
:Results with an arithmetic
>>
, outputing-96
.However, the following
main.nr
:with
Prover.toml
:Results with a logical
>>
, outputting8095
.Expected Behavior
>>
to act consistently on the same valueBug
>>
with a constant right hand-side behaves as an arithmetic shift, while with an input value rhs it behaves as a logical shiftTo Reproduce
Noir
projects, for each pair of program andProver.toml
nargo execute
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
Nice-to-have
Blocker Context
No response
Nargo Version
nargo version = 0.34.0 noirc version = 0.34.0+94ed0b8fb13a923a59f6f3ccd8d7c75e191deeca (git version hash: 94ed0b8, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: