pub trait OverflowingFrom<T>: Sized {
    fn overflowing_from(value: T) -> (Self, bool);
}
Expand description

Converts a value from one type to another, where if the conversion is not exact the result will wrap around. The result is returned along with a bool that indicates whether wrapping has occurred.

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

Required Methods

Implementations on Foreign Types

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to its own type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

Worst-case complexity

Constant time and additional memory.

Examples

See here.

Converts a value to the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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 the value’s type. Since this conversion is always valid and always leaves the value unchanged, the second component of the result is always false (no overflow).

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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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. The second component of the result indicates whether overflow occurred.

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

If the target type is unsigned, then $f_W(n) = (m, k \neq 0)$, 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, k \neq 0)$, 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