Wrapping::wrapping_neg
fn wrapping_neg(S a) -> S Import
Source: use arith::{Wrapping}; src/arith.hy -a modulo 2^64 (INT_MIN stays INT_MIN).
Parameters#
| Name | Type |
|---|---|
a | S |
Returns#
S
See also#
arith::INT_MINWrapping: Integer arithmetic that wraps around modulo 2^64 instead of panicking.Wrapping::wrapping_add:a + bmodulo 2^64.Wrapping::wrapping_sub:a - bmodulo 2^64.Wrapping::wrapping_mul:a * bmodulo 2^64.Wrapping::wrapping_pow:a ** expmodulo 2^64.Wrapping::wrapping_shl:a << (n & 63): the count is taken modulo 64.Wrapping::wrapping_shr:a >> (n & 63): the count is taken modulo 64.