pub trait WrappingFrom<T>: Sized {
    fn wrapping_from(value: T) -> Self;
}
Expand description

Converts a value from one type to another. where if the conversion is not exact the result will wrap around.

If WrappingFrom is implemented, it usually makes sense to implement OverflowingFrom as well.

Required Methods

Implementations on Foreign Types

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. This conversion is always valid and always leaves the value unchanged.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to another type. If the value cannot be represented in the new type, it is wrapped.

Let $W$ be the width of the target type.

If the target type is unsigned, then $f_W(n) = m$, where $m < 2^W$ and $n + 2^W k = m$ for some $k \in \Z$.

If the target type is signed, then $f_W(n) = m$, where $-2^{W-1} \leq m < 2^{W-1}$ and $n + 2^W k = m$ for some $k \in \Z$.

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Implementors