Skip to main content

unchecked_mul

Function unchecked_mul 

Source
pub const unsafe fn unchecked_mul<T: Copy>(x: T, y: T) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Expand description

Returns the result of an unchecked multiplication, resulting in undefined behavior when x * y > T::MAX or x * y < T::MIN.

The stable counterpart of this intrinsic is unchecked_mul on the various integer types, such as u16::unchecked_mul and i64::unchecked_mul.