We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
>>
Attempted to create a simple program which right-shifts a number.
The following main.nr:
main.nr
fn main(a: i16) { println(a >> 3); }
with Prover.toml:
Prover.toml
a = "-769"
Results with an arithmetic >>, outputing -96.
-96
However, the following main.nr:
fn main(a: i16, b: u8) { println(a >> b); }
a = "-769" b = 3
Results with a logical >>, outputting 8095.
8095
>> to act consistently on the same value
>> with a constant right hand-side behaves as an arithmetic shift, while with an input value rhs it behaves as a logical shift
Noir
nargo execute
None
No response
Nice-to-have
nargo version = 0.34.0 noirc version = 0.34.0+94ed0b8fb13a923a59f6f3ccd8d7c75e191deeca (git version hash: 94ed0b8, is dirty: false)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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: