mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
2 lines
No EOL
29 KiB
HTML
2 lines
No EOL
29 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>CCNativeint (containers.CCNativeint)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">containers</a> » CCNativeint</nav><h1>Module <code>CCNativeint</code></h1><h2 id="nativeint"><a href="#nativeint" class="anchor"></a>Nativeint</h2><p>Helpers for processor-native integers</p><p>This module provides operations on the type <code>nativeint</code> of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over nativeint are taken modulo 2<sup>32</sup> or 2<sup>64</sup> depending on the word size of the architecture.</p><p>Performance notice: values of type <code>nativeint</code> occupy more memory space than values of type <code>int</code>, and arithmetic operations on <code>nativeint</code> are generally slower than those on <code>int</code>. Use <code>nativeint</code> only when the application requires the extra bit of precision over the <code>int</code> type.</p><dl><dt>since</dt><dd>2.1</dd></dl><nav class="toc"><ul><li><a href="#conversion">Conversion</a></li><li><a href="#printing">Printing</a></li><li><a href="#infix-operators">Infix Operators</a></li></ul></nav></header><div><div class="spec include"><div class="doc"><p><a href="https://caml.inria.fr/pub/docs/manual-ocaml/libref/Nativeint.html">Documentation for the standard Nativeint module</a></p><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">module</span> <span class="keyword">type</span> <span class="keyword">of</span> <span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><dl><dt class="spec value" id="val-zero"><a href="#val-zero" class="anchor"></a><code><span class="keyword">val</span> zero : nativeint</code></dt><dt class="spec value" id="val-one"><a href="#val-one" class="anchor"></a><code><span class="keyword">val</span> one : nativeint</code></dt><dt class="spec value" id="val-minus_one"><a href="#val-minus_one" class="anchor"></a><code><span class="keyword">val</span> minus_one : nativeint</code></dt></dl><dl><dt class="spec external" id="val-neg"><a href="#val-neg" class="anchor"></a><code><span class="keyword">val</span> neg : nativeint <span>-></span> nativeint</code></dt><dt class="spec external" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val</span> add : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt><dt class="spec external" id="val-sub"><a href="#val-sub" class="anchor"></a><code><span class="keyword">val</span> sub : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt><dt class="spec external" id="val-mul"><a href="#val-mul" class="anchor"></a><code><span class="keyword">val</span> mul : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt><dt class="spec external" id="val-div"><a href="#val-div" class="anchor"></a><code><span class="keyword">val</span> div : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt></dl><dl><dt class="spec value" id="val-unsigned_div"><a href="#val-unsigned_div" class="anchor"></a><code><span class="keyword">val</span> unsigned_div : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt></dl><dl><dt class="spec external" id="val-rem"><a href="#val-rem" class="anchor"></a><code><span class="keyword">val</span> rem : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt></dl><dl><dt class="spec value" id="val-unsigned_rem"><a href="#val-unsigned_rem" class="anchor"></a><code><span class="keyword">val</span> unsigned_rem : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt><dt class="spec value" id="val-succ"><a href="#val-succ" class="anchor"></a><code><span class="keyword">val</span> succ : nativeint <span>-></span> nativeint</code></dt><dt class="spec value" id="val-pred"><a href="#val-pred" class="anchor"></a><code><span class="keyword">val</span> pred : nativeint <span>-></span> nativeint</code></dt><dt class="spec value" id="val-abs"><a href="#val-abs" class="anchor"></a><code><span class="keyword">val</span> abs : nativeint <span>-></span> nativeint</code></dt><dt class="spec value" id="val-size"><a href="#val-size" class="anchor"></a><code><span class="keyword">val</span> size : int</code></dt><dt class="spec value" id="val-max_int"><a href="#val-max_int" class="anchor"></a><code><span class="keyword">val</span> max_int : nativeint</code></dt><dt class="spec value" id="val-min_int"><a href="#val-min_int" class="anchor"></a><code><span class="keyword">val</span> min_int : nativeint</code></dt></dl><dl><dt class="spec external" id="val-logand"><a href="#val-logand" class="anchor"></a><code><span class="keyword">val</span> logand : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt><dt class="spec external" id="val-logor"><a href="#val-logor" class="anchor"></a><code><span class="keyword">val</span> logor : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt><dt class="spec external" id="val-logxor"><a href="#val-logxor" class="anchor"></a><code><span class="keyword">val</span> logxor : nativeint <span>-></span> nativeint <span>-></span> nativeint</code></dt></dl><dl><dt class="spec value" id="val-lognot"><a href="#val-lognot" class="anchor"></a><code><span class="keyword">val</span> lognot : nativeint <span>-></span> nativeint</code></dt></dl><dl><dt class="spec external" id="val-shift_left"><a href="#val-shift_left" class="anchor"></a><code><span class="keyword">val</span> shift_left : nativeint <span>-></span> int <span>-></span> nativeint</code></dt><dt class="spec external" id="val-shift_right"><a href="#val-shift_right" class="anchor"></a><code><span class="keyword">val</span> shift_right : nativeint <span>-></span> int <span>-></span> nativeint</code></dt><dt class="spec external" id="val-shift_right_logical"><a href="#val-shift_right_logical" class="anchor"></a><code><span class="keyword">val</span> shift_right_logical : nativeint <span>-></span> int <span>-></span> nativeint</code></dt><dt class="spec external" id="val-of_int"><a href="#val-of_int" class="anchor"></a><code><span class="keyword">val</span> of_int : int <span>-></span> nativeint</code></dt><dt class="spec external" id="val-to_int"><a href="#val-to_int" class="anchor"></a><code><span class="keyword">val</span> to_int : nativeint <span>-></span> int</code></dt></dl><dl><dt class="spec value" id="val-unsigned_to_int"><a href="#val-unsigned_to_int" class="anchor"></a><code><span class="keyword">val</span> unsigned_to_int : nativeint <span>-></span> <span>int option</span></code></dt></dl><dl><dt class="spec external" id="val-of_float"><a href="#val-of_float" class="anchor"></a><code><span class="keyword">val</span> of_float : float <span>-></span> nativeint</code></dt><dt class="spec external" id="val-to_float"><a href="#val-to_float" class="anchor"></a><code><span class="keyword">val</span> to_float : nativeint <span>-></span> float</code></dt><dt class="spec external" id="val-of_int32"><a href="#val-of_int32" class="anchor"></a><code><span class="keyword">val</span> of_int32 : int32 <span>-></span> nativeint</code></dt><dt class="spec external" id="val-to_int32"><a href="#val-to_int32" class="anchor"></a><code><span class="keyword">val</span> to_int32 : nativeint <span>-></span> int32</code></dt><dt class="spec external" id="val-of_string"><a href="#val-of_string" class="anchor"></a><code><span class="keyword">val</span> of_string : string <span>-></span> nativeint</code></dt></dl><dl><dt class="spec value" id="val-of_string_opt"><a href="#val-of_string_opt" class="anchor"></a><code><span class="keyword">val</span> of_string_opt : string <span>-></span> <span>nativeint option</span></code></dt><dt class="spec value" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span class="keyword">val</span> to_string : nativeint <span>-></span> string</code></dt></dl><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = nativeint</code></dt></dl><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> int</code></dt><dt class="spec value" id="val-unsigned_compare"><a href="#val-unsigned_compare" class="anchor"></a><code><span class="keyword">val</span> unsigned_compare : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> int</code></dt><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt></dl><dl><dt class="spec external" id="val-format"><a href="#val-format" class="anchor"></a><code><span class="keyword">val</span> format : string <span>-></span> nativeint <span>-></span> string</code></dt></dl></details></div></div></div><dl><dt class="spec value" id="val-min"><a href="#val-min" class="anchor"></a><code><span class="keyword">val</span> min : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>min x y</code> returns the minimum of the two integers <code>x</code> and <code>y</code>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-max"><a href="#val-max" class="anchor"></a><code><span class="keyword">val</span> max : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>max x y</code> returns the maximum of the two integers <code>x</code> and <code>y</code>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-hash"><a href="#val-hash" class="anchor"></a><code><span class="keyword">val</span> hash : <a href="index.html#type-t">t</a> <span>-></span> int</code></dt><dd><p><code>hash x</code> computes the hash of <code>x</code>. Like <span class="xref-unresolved" title="unresolved reference to "Stdlib.abs (to_int x)""><code>Stdlib</code>.abs (to_int x)</span>.</p></dd></dl><dl><dt class="spec value" id="val-sign"><a href="#val-sign" class="anchor"></a><code><span class="keyword">val</span> sign : <a href="index.html#type-t">t</a> <span>-></span> int</code></dt><dd><p><code>sign x</code> return <code>0</code> if <code>x = 0</code>, <code>-1</code> if <code>x < 0</code> and <code>1</code> if <code>x > 0</code>. Same as <code>compare x zero</code>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-pow"><a href="#val-pow" class="anchor"></a><code><span class="keyword">val</span> pow : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>pow base exponent</code> returns <code>base</code> raised to the power of <code>exponent</code>. <code>pow x y = x^y</code> for positive integers <code>x</code> and <code>y</code>. Raises <code>Invalid_argument</code> if <code>x = y = 0</code> or <code>y</code> < 0.</p><dl><dt>since</dt><dd>0.11</dd></dl></dd></dl><dl><dt class="spec value" id="val-floor_div"><a href="#val-floor_div" class="anchor"></a><code><span class="keyword">val</span> floor_div : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>floor_div x n</code> is integer division rounding towards negative infinity. It satisfies <code>x = m * floor_div x n + rem x n</code>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec type" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span class="keyword">type</span> <span>'a printer</span></code><code> = Stdlib.Format.formatter <span>-></span> <span class="type-var">'a</span> <span>-></span> unit</code></dt><dt class="spec type" id="type-random_gen"><a href="#type-random_gen" class="anchor"></a><code><span class="keyword">type</span> <span>'a random_gen</span></code><code> = Stdlib.Random.State.t <span>-></span> <span class="type-var">'a</span></code></dt><dt class="spec type" id="type-iter"><a href="#type-iter" class="anchor"></a><code><span class="keyword">type</span> <span>'a iter</span></code><code> = <span>(<span class="type-var">'a</span> <span>-></span> unit)</span> <span>-></span> unit</code></dt></dl><dl><dt class="spec value" id="val-range_by"><a href="#val-range_by" class="anchor"></a><code><span class="keyword">val</span> range_by : <span>step:<a href="index.html#type-t">t</a></span> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-iter">iter</a></span></code></dt><dd><p><code>range_by ~step i j</code> iterates on integers from <code>i</code> to <code>j</code> included, where the difference between successive elements is <code>step</code>. Use a negative <code>step</code> for a decreasing list.</p><dl><dt>raises Invalid_argument</dt><dd><p>if <code>step=0</code>.</p></dd></dl><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-range"><a href="#val-range" class="anchor"></a><code><span class="keyword">val</span> range : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-iter">iter</a></span></code></dt><dd><p><code>range i j</code> iterates on integers from <code>i</code> to <code>j</code> included . It works both for decreasing and increasing ranges.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-range'"><a href="#val-range'" class="anchor"></a><code><span class="keyword">val</span> range' : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-iter">iter</a></span></code></dt><dd><p><code>range' i j</code> is like <a href="index.html#val-range"><code>range</code></a> but the second bound <code>j</code> is excluded. For instance <code>range' 0 5 = Iter.of_list [0;1;2;3;4]</code>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-random"><a href="#val-random" class="anchor"></a><code><span class="keyword">val</span> random : <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-random_gen">random_gen</a></span></code></dt><dt class="spec value" id="val-random_small"><a href="#val-random_small" class="anchor"></a><code><span class="keyword">val</span> random_small : <span><a href="index.html#type-t">t</a> <a href="index.html#type-random_gen">random_gen</a></span></code></dt><dt class="spec value" id="val-random_range"><a href="#val-random_range" class="anchor"></a><code><span class="keyword">val</span> random_range : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-random_gen">random_gen</a></span></code></dt></dl><section><header><h3 id="conversion"><a href="#conversion" class="anchor"></a>Conversion</h3></header><dl><dt class="spec value" id="val-of_string"><a href="#val-of_string" class="anchor"></a><code><span class="keyword">val</span> of_string : string <span>-></span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p><code>of_string s</code> is the safe version of <a href="index.html#val-of_string_exn"><code>of_string_exn</code></a>. Like <a href="index.html#val-of_string_exn"><code>of_string_exn</code></a>, but return <code>None</code> instead of raising.</p></dd></dl><dl><dt class="spec value" id="val-of_string_opt"><a href="#val-of_string_opt" class="anchor"></a><code><span class="keyword">val</span> of_string_opt : string <span>-></span> <span><a href="index.html#type-t">t</a> option</span></code></dt><dd><p><code>of_string_opt s</code> is an alias to <a href="index.html#val-of_string"><code>of_string</code></a>.</p></dd></dl><dl><dt class="spec value" id="val-of_string_exn"><a href="#val-of_string_exn" class="anchor"></a><code><span class="keyword">val</span> of_string_exn : string <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>of_string_exn s</code> converts the given string <code>s</code> into a native integer. Alias to <span class="xref-unresolved" title="unresolved reference to "Nativeint.of_string""><code>Nativeint</code>.of_string</span>. Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with <code>0u</code>) or in hexadecimal, octal or binary if the string begins with <code>0x</code>, <code>0o</code> or <code>0b</code> respectively.</p><p>The <code>0u</code> prefix reads the input as an unsigned integer in the range <code>[0, 2*CCNativeint.max_int+1]</code>. If the input exceeds <a href="index.html#val-max_int"><code>CCNativeint.max_int</code></a> it is converted to the signed integer <code>CCInt64.min_int + input - CCNativeint.max_int - 1</code>.</p><p>Raise <code>Failure "Nativeint.of_string"</code> if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type <code>nativeint</code>.</p></dd></dl><dl><dt class="spec value" id="val-to_string_binary"><a href="#val-to_string_binary" class="anchor"></a><code><span class="keyword">val</span> to_string_binary : <a href="index.html#type-t">t</a> <span>-></span> string</code></dt><dd><p><code>to_string_binary x</code> returns the string representation of the integer <code>x</code>, in binary.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl></section><section><header><h3 id="printing"><a href="#printing" class="anchor"></a>Printing</h3></header><dl><dt class="spec value" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span class="keyword">val</span> pp : <span><a href="index.html#type-t">t</a> <a href="index.html#type-printer">printer</a></span></code></dt><dd><p><code>pp ppf x</code> prints the integer <code>x</code> on <code>ppf</code>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-pp_binary"><a href="#val-pp_binary" class="anchor"></a><code><span class="keyword">val</span> pp_binary : <span><a href="index.html#type-t">t</a> <a href="index.html#type-printer">printer</a></span></code></dt><dd><p><code>pp_binary ppf x</code> prints <code>x</code> on <code>ppf</code>. Print as "0b00101010".</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl></section><section><header><h3 id="infix-operators"><a href="#infix-operators" class="anchor"></a>Infix Operators</h3></header><div class="spec module" id="module-Infix"><a href="#module-Infix" class="anchor"></a><code><span class="keyword">module</span> <a href="Infix/index.html">Infix</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div><div class="spec include"><div class="doc"><details open="open"><summary><span class="def"><code><span class="keyword">include</span> <span class="keyword">module</span> <span class="keyword">type</span> <span class="keyword">of</span> <a href="index.html#module-Infix">Infix</a></code></span></summary><dl><dt class="spec value" id="val-(+)"><a href="#val-(+)" class="anchor"></a><code><span class="keyword">val</span> (+) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x + y</code> is the sum of <code>x</code> and <code>y</code>. Addition.</p></dd></dl><dl><dt class="spec value" id="val-(-)"><a href="#val-(-)" class="anchor"></a><code><span class="keyword">val</span> (-) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x - y</code> is the difference of <code>x</code> and <code>y</code>. Subtraction.</p></dd></dl><dl><dt class="spec value" id="val-(~-)"><a href="#val-(~-)" class="anchor"></a><code><span class="keyword">val</span> (~-) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>~- x</code> is the negation of <code>x</code>. Unary negation.</p></dd></dl><dl><dt class="spec value" id="val-(*)"><a href="#val-(*)" class="anchor"></a><code><span class="keyword">val</span> (*) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code> x * y</code> is the product of <code>x</code> and <code>y</code>. Multiplication.</p></dd></dl><dl><dt class="spec value" id="val-(/)"><a href="#val-(/)" class="anchor"></a><code><span class="keyword">val</span> (/) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x / y</code> is the integer quotient of <code>x</code> and <code>y</code>. Integer division. Raise <code>Division_by_zero</code> if the second argument <code>y</code> is zero. This division rounds the real quotient of its arguments towards zero, as specified for <span class="xref-unresolved" title="unresolved reference to "Stdlib.(/)""><code>Stdlib</code>.(/)</span>.</p></dd></dl><dl><dt class="spec value" id="val-(mod)"><a href="#val-(mod)" class="anchor"></a><code><span class="keyword">val</span> (mod) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x mod y</code> is the integer remainder of <code>x / y</code>. If <code>y <> zero</code>, the result of <code>x mod y</code> satisfies the following properties: <code>zero <= x mod y < abs y</code> and <code>x = ((x / y) * y) + (x mod y)</code>. If <code>y = 0</code>, <code>x mod y</code> raises <code>Division_by_zero</code>.</p></dd></dl><dl><dt class="spec value" id="val-(**)"><a href="#val-(**)" class="anchor"></a><code><span class="keyword">val</span> (**) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p>Alias to <a href="index.html#val-pow"><code>pow</code></a></p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-(--)"><a href="#val-(--)" class="anchor"></a><code><span class="keyword">val</span> (--) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-iter">iter</a></span></code></dt><dd><p>Alias to <a href="index.html#val-range"><code>range</code></a>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-(--^)"><a href="#val-(--^)" class="anchor"></a><code><span class="keyword">val</span> (--^) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <span><a href="index.html#type-t">t</a> <a href="index.html#type-iter">iter</a></span></code></dt><dd><p>Alias to <a href="index.html#val-range'"><code>range'</code></a>.</p><dl><dt>since</dt><dd>3.0</dd></dl></dd></dl><dl><dt class="spec value" id="val-(land)"><a href="#val-(land)" class="anchor"></a><code><span class="keyword">val</span> (land) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x land y</code> is the bitwise logical and of <code>x</code> and <code>y</code>.</p></dd></dl><dl><dt class="spec value" id="val-(lor)"><a href="#val-(lor)" class="anchor"></a><code><span class="keyword">val</span> (lor) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x lor y</code> is the bitwise logical or of <code>x</code> and <code>y</code>.</p></dd></dl><dl><dt class="spec value" id="val-(lxor)"><a href="#val-(lxor)" class="anchor"></a><code><span class="keyword">val</span> (lxor) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x lxor y</code> is the bitwise logical exclusive or of <code>x</code> and <code>y</code>.</p></dd></dl><dl><dt class="spec value" id="val-(lnot)"><a href="#val-(lnot)" class="anchor"></a><code><span class="keyword">val</span> (lnot) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>lnot x</code> is the bitwise logical negation of <code>x</code> (the bits of <code>x</code> are inverted).</p></dd></dl><dl><dt class="spec value" id="val-(lsl)"><a href="#val-(lsl)" class="anchor"></a><code><span class="keyword">val</span> (lsl) : <a href="index.html#type-t">t</a> <span>-></span> int <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code> x lsl y</code> shifts <code>x</code> to the left by <code>y</code> bits. The result is unspecified if <code>y < 0</code> or <code>y >= bitsize</code>, where <code>bitsize</code> is <code>32</code> on a 32-bit platform and <code>64</code> on a 64-bit platform.</p></dd></dl><dl><dt class="spec value" id="val-(lsr)"><a href="#val-(lsr)" class="anchor"></a><code><span class="keyword">val</span> (lsr) : <a href="index.html#type-t">t</a> <span>-></span> int <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x lsr y</code> shifts <code>x</code> to the right by <code>y</code> bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of <code>x</code>. The result is unspecified if <code>y < 0</code> or <code>y >= bitsize</code>.</p></dd></dl><dl><dt class="spec value" id="val-(asr)"><a href="#val-(asr)" class="anchor"></a><code><span class="keyword">val</span> (asr) : <a href="index.html#type-t">t</a> <span>-></span> int <span>-></span> <a href="index.html#type-t">t</a></code></dt><dd><p><code>x asr y</code> shifts <code>x</code> to the right by <code>y</code> bits. This is an arithmetic shift: the sign bit of <code>x</code> is replicated and inserted in the vacated bits. The result is unspecified if <code>y < 0</code> or <code>y >= bitsize</code>.</p></dd></dl><dl><dt class="spec value" id="val-(=)"><a href="#val-(=)" class="anchor"></a><code><span class="keyword">val</span> (=) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt><dt class="spec value" id="val-(<>)"><a href="#val-(<>)" class="anchor"></a><code><span class="keyword">val</span> (<>) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt><dt class="spec value" id="val-(>)"><a href="#val-(>)" class="anchor"></a><code><span class="keyword">val</span> (>) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt><dt class="spec value" id="val-(>=)"><a href="#val-(>=)" class="anchor"></a><code><span class="keyword">val</span> (>=) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt><dt class="spec value" id="val-(<=)"><a href="#val-(<=)" class="anchor"></a><code><span class="keyword">val</span> (<=) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt><dt class="spec value" id="val-(<)"><a href="#val-(<)" class="anchor"></a><code><span class="keyword">val</span> (<) : <a href="index.html#type-t">t</a> <span>-></span> <a href="index.html#type-t">t</a> <span>-></span> bool</code></dt></dl></details></div></div></div></section></div></body></html> |