SQ in silver chrome letters, a lab's gear stacked against the S: a rack, two oscilloscopes, pizza boxes and a six-pack. Strange Query Lab

CARDIAC › rust-cardiac › Message codes › RCE0011

RCE0011error

A u8 product with its overflow flag.

error[RCE0011]: a u8 product with its overflow flag (`overflowing_mul`, `checked_mul`) is not supported: past a card it can't be wrapped

overflowing_mul or checked_mul on a u8, whose product can pass what a card holds.

A u8 product can be as big as 255 × 255. The method needs the whole product to say whether it overflowed and to wrap it, and on CARDIAC a product past 999 can't be held to be wrapped.

Multiply in i16 with values that keep the product on a card, and test it yourself.

let p = a as i16 * b as i16; // a and b below 32: on a card
let fits = p <= 255;

In a terminal: cargo cardiac help RCE0011.