quil
quil copied to clipboard
Introduce a modulo operator
Tracking a value modulo 2*pi is a relatively useful thing to do, perhaps Quil's expressions should be extended to include a modulo operator.
Since % is already used for variables this wouldn't be a good choice. Instead we could:
- introduce a function
mod(dividend, divisor)
, although this would be the first named function in quil with >1 arguments - introduce some other symbol (maybe
\
)
@stylewarning would this be written
MOD remainder dividend divisor
another option is to do division and remainder simultaneously