wasmi/num_integer/trait.Integer.html

315 lines
128 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Integer` trait in crate `num_integer`."><meta name="keywords" content="rust, rustlang, rust-lang, Integer"><title>num_integer::Integer - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="shortcut icon" href="../favicon.ico"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../num_integer/index.html'><div class='logo-container'><img src='../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Integer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.div_floor">div_floor</a><a href="#tymethod.div_rem">div_rem</a><a href="#tymethod.divides">divides</a><a href="#tymethod.gcd">gcd</a><a href="#tymethod.is_even">is_even</a><a href="#tymethod.is_multiple_of">is_multiple_of</a><a href="#tymethod.is_odd">is_odd</a><a href="#tymethod.lcm">lcm</a><a href="#tymethod.mod_floor">mod_floor</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.div_ceil">div_ceil</a><a href="#method.div_mod_floor">div_mod_floor</a><a href="#method.extended_gcd">extended_gcd</a><a href="#method.extended_gcd_lcm">extended_gcd_lcm</a><a href="#method.gcd_lcm">gcd_lcm</a><a href="#method.next_multiple_of">next_multiple_of</a><a href="#method.prev_multiple_of">prev_multiple_of</a></div><a class="sidebar-title" href="#foreign-impls">Implementations on Foreign Types</a><div class="sidebar-links"><a href="#impl-Integer-for-i128">i128</a><a href="#impl-Integer-for-i16">i16</a><a href="#impl-Integer-for-i32">i32</a><a href="#impl-Integer-for-i64">i64</a><a href="#impl-Integer-for-i8">i8</a><a href="#impl-Integer-for-isize">isize</a><a href="#impl-Integer-for-u128">u128</a><a href="#impl-Integer-for-u16">u16</a><a href="#impl-Integer-for-u32">u32</a><a href="#impl-Integer-for-u64">u64</a><a href="#impl-Integer-for-u8">u8</a><a href="#impl-Integer-for-usize">usize</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='index.html'>num_integer</a></p><script>window.sidebarCurrent = {name: 'Integer', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../src/num_integer/lib.rs.html#33-343' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='index.html'>num_integer</a>::<wbr><a class="trait" href=''>Integer</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Integer: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="../num_traits/trait.Num.html" title="trait num_traits::Num">Num</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialOrd.html" title="trait core::cmp::PartialOrd">PartialOrd</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Ord.html" title="trait core::cmp::Ord">Ord</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.Eq.html" title="trait core::cmp::Eq">Eq</a> {
fn <a href='#tymethod.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>;
fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self { ... }
<div class='item-spacer'></div> fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.extended_gcd' class='fnname'>extended_gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a><br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="../num_traits/sign/trait.Signed.html" title="trait num_traits::sign::Signed">Signed</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.next_multiple_of' class='fnname'>next_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.prev_multiple_of' class='fnname'>prev_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a></span>,
{ ... }
}</pre></div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.div_floor' class='method'><code id='div_floor.v'>fn <a href='#tymethod.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code></h3><div class='docblock'><p>Floored integer division.</p>
<h1 id="examples" class="section-header"><a href="#examples">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_floor</span>(<span class="op">&amp;</span> <span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="number">2</span>);
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">3</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_floor</span>(<span class="op">&amp;</span> <span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">3</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="number">2</span>);
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_floor</span>(<span class="op">&amp;</span> <span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="number">0</span>);
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_floor</span>(<span class="op">&amp;</span> <span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="number">0</span>);</pre></div>
</div><h3 id='tymethod.mod_floor' class='method'><code id='mod_floor.v'>fn <a href='#tymethod.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code></h3><div class='docblock'><p>Floored integer modulo, satisfying:</p>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">n</span>.<span class="ident">div_floor</span>(<span class="kw-2">&amp;</span><span class="ident">d</span>) <span class="op">*</span> <span class="ident">d</span> <span class="op">+</span> <span class="ident">n</span>.<span class="ident">mod_floor</span>(<span class="kw-2">&amp;</span><span class="ident">d</span>) <span class="op">=</span><span class="op">=</span> <span class="ident">n</span>)</pre></div>
<h1 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">mod_floor</span>(<span class="op">&amp;</span> <span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="number">2</span>);
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">mod_floor</span>(<span class="op">&amp;</span> <span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">2</span>);
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">mod_floor</span>(<span class="op">&amp;</span> <span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">mod_floor</span>(<span class="op">&amp;</span> <span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="number">1</span>);
<span class="macro">assert</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>) <span class="op">=</span><span class="op">=</span> <span class="op">-</span><span class="number">1</span>);</pre></div>
</div><h3 id='tymethod.gcd' class='method'><code id='gcd.v'>fn <a href='#tymethod.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code></h3><div class='docblock'><p>Greatest Common Divisor (GCD).</p>
<h1 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">6</span>.<span class="ident">gcd</span>(<span class="kw-2">&amp;</span><span class="number">8</span>), <span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">7</span>.<span class="ident">gcd</span>(<span class="kw-2">&amp;</span><span class="number">3</span>), <span class="number">1</span>);</pre></div>
</div><h3 id='tymethod.lcm' class='method'><code id='lcm.v'>fn <a href='#tymethod.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code></h3><div class='docblock'><p>Lowest Common Multiple (LCM).</p>
<h1 id="examples-3" class="section-header"><a href="#examples-3">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">7</span>.<span class="ident">lcm</span>(<span class="kw-2">&amp;</span><span class="number">3</span>), <span class="number">21</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">2</span>.<span class="ident">lcm</span>(<span class="kw-2">&amp;</span><span class="number">4</span>), <span class="number">4</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">0</span>.<span class="ident">lcm</span>(<span class="kw-2">&amp;</span><span class="number">0</span>), <span class="number">0</span>);</pre></div>
</div><h3 id='tymethod.divides' class='method'><code id='divides.v'>fn <a href='#tymethod.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h3 id='tymethod.is_multiple_of' class='method'><code id='is_multiple_of.v'>fn <a href='#tymethod.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns <code>true</code> if <code>self</code> is a multiple of <code>other</code>.</p>
<h1 id="examples-4" class="section-header"><a href="#examples-4">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">9</span>.<span class="ident">is_multiple_of</span>(<span class="kw-2">&amp;</span><span class="number">3</span>), <span class="bool-val">true</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">3</span>.<span class="ident">is_multiple_of</span>(<span class="kw-2">&amp;</span><span class="number">9</span>), <span class="bool-val">false</span>);</pre></div>
</div><h3 id='tymethod.is_even' class='method'><code id='is_even.v'>fn <a href='#tymethod.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns <code>true</code> if the number is even.</p>
<h1 id="examples-5" class="section-header"><a href="#examples-5">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">3</span>.<span class="ident">is_even</span>(), <span class="bool-val">false</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">4</span>.<span class="ident">is_even</span>(), <span class="bool-val">true</span>);</pre></div>
</div><h3 id='tymethod.is_odd' class='method'><code id='is_odd.v'>fn <a href='#tymethod.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns <code>true</code> if the number is odd.</p>
<h1 id="examples-6" class="section-header"><a href="#examples-6">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">3</span>.<span class="ident">is_odd</span>(), <span class="bool-val">true</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">4</span>.<span class="ident">is_odd</span>(), <span class="bool-val">false</span>);</pre></div>
</div><h3 id='tymethod.div_rem' class='method'><code id='div_rem.v'>fn <a href='#tymethod.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></h3><div class='docblock'><p>Simultaneous truncated integer division and modulus.
Returns <code>(quotient, remainder)</code>.</p>
<h1 id="examples-7" class="section-header"><a href="#examples-7">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_rem</span>( <span class="kw-2">&amp;</span><span class="number">3</span>), ( <span class="number">2</span>, <span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_rem</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>), (<span class="op">-</span><span class="number">2</span>, <span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_rem</span>( <span class="kw-2">&amp;</span><span class="number">3</span>), (<span class="op">-</span><span class="number">2</span>, <span class="op">-</span><span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_rem</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>), ( <span class="number">2</span>, <span class="op">-</span><span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_rem</span>( <span class="kw-2">&amp;</span><span class="number">2</span>), ( <span class="number">0</span>, <span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_rem</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>), ( <span class="number">0</span>, <span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_rem</span>( <span class="kw-2">&amp;</span><span class="number">2</span>), ( <span class="number">0</span>, <span class="op">-</span><span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_rem</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>), ( <span class="number">0</span>, <span class="op">-</span><span class="number">1</span>));</pre></div>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.div_ceil' class='method'><code id='div_ceil.v'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code></h3><div class='docblock'><p>Ceiled integer division.</p>
<h1 id="examples-8" class="section-header"><a href="#examples-8">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_ceil</span>( <span class="kw-2">&amp;</span><span class="number">3</span>), <span class="number">3</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_ceil</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>), <span class="op">-</span><span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_ceil</span>( <span class="kw-2">&amp;</span><span class="number">3</span>), <span class="op">-</span><span class="number">2</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_ceil</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>), <span class="number">3</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_ceil</span>( <span class="kw-2">&amp;</span><span class="number">2</span>), <span class="number">1</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_ceil</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>), <span class="number">0</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_ceil</span>( <span class="kw-2">&amp;</span><span class="number">2</span>), <span class="number">0</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_ceil</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>), <span class="number">1</span>);</pre></div>
</div><h3 id='method.gcd_lcm' class='method'><code id='gcd_lcm.v'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></h3><div class='docblock'><p>Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) together.</p>
<p>Potentially more efficient than calling <code>gcd</code> and <code>lcm</code>
individually for identical inputs.</p>
<h1 id="examples-9" class="section-header"><a href="#examples-9">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">10</span>.<span class="ident">gcd_lcm</span>(<span class="kw-2">&amp;</span><span class="number">4</span>), (<span class="number">2</span>, <span class="number">20</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="number">8</span>.<span class="ident">gcd_lcm</span>(<span class="kw-2">&amp;</span><span class="number">9</span>), (<span class="number">1</span>, <span class="number">72</span>));</pre></div>
</div><h3 id='method.extended_gcd' class='method'><code id='extended_gcd.v'>fn <a href='#method.extended_gcd' class='fnname'>extended_gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code></h3><div class='docblock'><p>Greatest common divisor and Bézout coefficients.</p>
<h1 id="examples-10" class="section-header"><a href="#examples-10">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">fn</span> <span class="ident">check</span><span class="op">&lt;</span><span class="ident">A</span>: <span class="ident">Copy</span> <span class="op">+</span> <span class="ident">Integer</span> <span class="op">+</span> <span class="ident">NumAssign</span><span class="op">&gt;</span>(<span class="ident">a</span>: <span class="ident">A</span>, <span class="ident">b</span>: <span class="ident">A</span>) <span class="op">-</span><span class="op">&gt;</span> <span class="ident">bool</span> {
<span class="kw">let</span> <span class="ident">ExtendedGcd</span> { <span class="ident">gcd</span>, <span class="ident">x</span>, <span class="ident">y</span>, .. } <span class="op">=</span> <span class="ident">a</span>.<span class="ident">extended_gcd</span>(<span class="kw-2">&amp;</span><span class="ident">b</span>);
<span class="ident">gcd</span> <span class="op">=</span><span class="op">=</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">a</span> <span class="op">+</span> <span class="ident">y</span> <span class="op">*</span> <span class="ident">b</span>
}
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">check</span>(<span class="number">10isize</span>, <span class="number">4isize</span>));
<span class="macro">assert</span><span class="macro">!</span>(<span class="ident">check</span>(<span class="number">8isize</span>, <span class="number">9isize</span>));</pre></div>
</div><h3 id='method.extended_gcd_lcm' class='method'><code id='extended_gcd_lcm.v'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a> <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="../num_traits/sign/trait.Signed.html" title="trait num_traits::sign::Signed">Signed</a>,&nbsp;</span></code></h3><div class='docblock'><p>Greatest common divisor, least common multiple, and Bézout coefficients.</p>
</div><h3 id='method.div_mod_floor' class='method'><code id='div_mod_floor.v'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></h3><div class='docblock'><p>Simultaneous floored integer division and modulus.
Returns <code>(quotient, remainder)</code>.</p>
<h1 id="examples-11" class="section-header"><a href="#examples-11">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_mod_floor</span>( <span class="kw-2">&amp;</span><span class="number">3</span>), ( <span class="number">2</span>, <span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">8</span>).<span class="ident">div_mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>), (<span class="op">-</span><span class="number">3</span>, <span class="op">-</span><span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_mod_floor</span>( <span class="kw-2">&amp;</span><span class="number">3</span>), (<span class="op">-</span><span class="number">3</span>, <span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">8</span>).<span class="ident">div_mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">3</span>), ( <span class="number">2</span>, <span class="op">-</span><span class="number">2</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_mod_floor</span>( <span class="kw-2">&amp;</span><span class="number">2</span>), ( <span class="number">0</span>, <span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">1</span>).<span class="ident">div_mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>), (<span class="op">-</span><span class="number">1</span>, <span class="op">-</span><span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_mod_floor</span>( <span class="kw-2">&amp;</span><span class="number">2</span>), (<span class="op">-</span><span class="number">1</span>, <span class="number">1</span>));
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">1</span>).<span class="ident">div_mod_floor</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">2</span>), ( <span class="number">0</span>, <span class="op">-</span><span class="number">1</span>));</pre></div>
</div><h3 id='method.next_multiple_of' class='method'><code id='next_multiple_of.v'>fn <a href='#method.next_multiple_of' class='fnname'>next_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code></h3><div class='docblock'><p>Rounds up to nearest multiple of argument.</p>
<h1 id="notes" class="section-header"><a href="#notes">Notes</a></h1>
<p>For signed types, <code>a.next_multiple_of(b) = a.prev_multiple_of(b.neg())</code>.</p>
<h1 id="examples-12" class="section-header"><a href="#examples-12">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">16</span>).<span class="ident">next_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">23</span>).<span class="ident">next_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="number">24</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">16</span>).<span class="ident">next_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">23</span>).<span class="ident">next_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">16</span>).<span class="ident">next_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="op">-</span><span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">23</span>).<span class="ident">next_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="op">-</span><span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">16</span>).<span class="ident">next_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="op">-</span><span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">23</span>).<span class="ident">next_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="op">-</span><span class="number">24</span>);</pre></div>
</div><h3 id='method.prev_multiple_of' class='method'><code id='prev_multiple_of.v'>fn <a href='#method.prev_multiple_of' class='fnname'>prev_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,&nbsp;</span></code></h3><div class='docblock'><p>Rounds down to nearest multiple of argument.</p>
<h1 id="notes-1" class="section-header"><a href="#notes-1">Notes</a></h1>
<p>For signed types, <code>a.prev_multiple_of(b) = a.next_multiple_of(b.neg())</code>.</p>
<h1 id="examples-13" class="section-header"><a href="#examples-13">Examples</a></h1>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">16</span>).<span class="ident">prev_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">23</span>).<span class="ident">prev_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">16</span>).<span class="ident">prev_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>(( <span class="number">23</span>).<span class="ident">prev_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="number">24</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">16</span>).<span class="ident">prev_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="op">-</span><span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">23</span>).<span class="ident">prev_multiple_of</span>(<span class="op">&amp;</span> <span class="number">8</span>), <span class="op">-</span><span class="number">24</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">16</span>).<span class="ident">prev_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="op">-</span><span class="number">16</span>);
<span class="macro">assert_eq</span><span class="macro">!</span>((<span class="op">-</span><span class="number">23</span>).<span class="ident">prev_multiple_of</span>(<span class="kw-2">&amp;</span><span class="op">-</span><span class="number">8</span>), <span class="op">-</span><span class="number">16</span>);</pre></div>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='foreign-impls' class='small-section-header'>Implementations on Foreign Types<a href='#foreign-impls' class='anchor'></a></h2><h3 id='impl-Integer-for-i8' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a></code><a href='#impl-Integer-for-i8' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#406-563' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor' class="method"><code id='div_floor.v-1'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#409-418' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer division</p>
</div><h4 id='method.mod_floor' class="method"><code id='mod_floor.v-1'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#422-431' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer modulo</p>
</div><h4 id='method.div_mod_floor-1' class="method"><code id='div_mod_floor.v-1'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#435-444' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates <code>div_floor</code> and <code>mod_floor</code> simultaneously</p>
</div><h4 id='method.div_ceil-1' class="method hidden"><code id='div_ceil.v-1'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#447-454' title='goto source code'>[src]</a></h4><h4 id='method.gcd' class="method"><code id='gcd.v-1'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#459-500' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and
<code>other</code>. The result is always positive.</p>
</div><h4 id='method.extended_gcd_lcm-1' class="method hidden"><code id='extended_gcd_lcm.v-1'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#503-512' title='goto source code'>[src]</a></h4><h4 id='method.lcm' class="method"><code id='lcm.v-1'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#517-519' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and
<code>other</code>.</p>
</div><h4 id='method.gcd_lcm-1' class="method"><code id='gcd_lcm.v-1'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#524-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides' class="method"><code id='divides.v-1'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#536-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of' class="method"><code id='is_multiple_of.v-1'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#542-544' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even' class="method"><code id='is_even.v-1'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#548-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code></p>
</div><h4 id='method.is_odd' class="method"><code id='is_odd.v-1'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code></p>
</div><h4 id='method.div_rem' class="method"><code id='div_rem.v-1'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#560-562' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-i16' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a></code><a href='#impl-Integer-for-i16' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#406-563' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-1' class="method"><code id='div_floor.v-2'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#409-418' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer division</p>
</div><h4 id='method.mod_floor-1' class="method"><code id='mod_floor.v-2'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#422-431' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer modulo</p>
</div><h4 id='method.div_mod_floor-2' class="method"><code id='div_mod_floor.v-2'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#435-444' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates <code>div_floor</code> and <code>mod_floor</code> simultaneously</p>
</div><h4 id='method.div_ceil-2' class="method hidden"><code id='div_ceil.v-2'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#447-454' title='goto source code'>[src]</a></h4><h4 id='method.gcd-1' class="method"><code id='gcd.v-2'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#459-500' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and
<code>other</code>. The result is always positive.</p>
</div><h4 id='method.extended_gcd_lcm-2' class="method hidden"><code id='extended_gcd_lcm.v-2'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#503-512' title='goto source code'>[src]</a></h4><h4 id='method.lcm-1' class="method"><code id='lcm.v-2'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#517-519' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and
<code>other</code>.</p>
</div><h4 id='method.gcd_lcm-2' class="method"><code id='gcd_lcm.v-2'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#524-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-1' class="method"><code id='divides.v-2'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#536-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-1' class="method"><code id='is_multiple_of.v-2'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#542-544' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-1' class="method"><code id='is_even.v-2'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#548-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code></p>
</div><h4 id='method.is_odd-1' class="method"><code id='is_odd.v-2'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code></p>
</div><h4 id='method.div_rem-1' class="method"><code id='div_rem.v-2'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#560-562' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-i32' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a></code><a href='#impl-Integer-for-i32' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#406-563' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-2' class="method"><code id='div_floor.v-3'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#409-418' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer division</p>
</div><h4 id='method.mod_floor-2' class="method"><code id='mod_floor.v-3'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#422-431' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer modulo</p>
</div><h4 id='method.div_mod_floor-3' class="method"><code id='div_mod_floor.v-3'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#435-444' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates <code>div_floor</code> and <code>mod_floor</code> simultaneously</p>
</div><h4 id='method.div_ceil-3' class="method hidden"><code id='div_ceil.v-3'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#447-454' title='goto source code'>[src]</a></h4><h4 id='method.gcd-2' class="method"><code id='gcd.v-3'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#459-500' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and
<code>other</code>. The result is always positive.</p>
</div><h4 id='method.extended_gcd_lcm-3' class="method hidden"><code id='extended_gcd_lcm.v-3'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#503-512' title='goto source code'>[src]</a></h4><h4 id='method.lcm-2' class="method"><code id='lcm.v-3'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#517-519' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and
<code>other</code>.</p>
</div><h4 id='method.gcd_lcm-3' class="method"><code id='gcd_lcm.v-3'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#524-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-2' class="method"><code id='divides.v-3'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#536-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-2' class="method"><code id='is_multiple_of.v-3'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#542-544' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-2' class="method"><code id='is_even.v-3'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#548-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code></p>
</div><h4 id='method.is_odd-2' class="method"><code id='is_odd.v-3'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code></p>
</div><h4 id='method.div_rem-2' class="method"><code id='div_rem.v-3'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#560-562' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-i64' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></code><a href='#impl-Integer-for-i64' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#406-563' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-3' class="method"><code id='div_floor.v-4'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#409-418' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer division</p>
</div><h4 id='method.mod_floor-3' class="method"><code id='mod_floor.v-4'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#422-431' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer modulo</p>
</div><h4 id='method.div_mod_floor-4' class="method"><code id='div_mod_floor.v-4'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#435-444' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates <code>div_floor</code> and <code>mod_floor</code> simultaneously</p>
</div><h4 id='method.div_ceil-4' class="method hidden"><code id='div_ceil.v-4'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#447-454' title='goto source code'>[src]</a></h4><h4 id='method.gcd-3' class="method"><code id='gcd.v-4'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#459-500' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and
<code>other</code>. The result is always positive.</p>
</div><h4 id='method.extended_gcd_lcm-4' class="method hidden"><code id='extended_gcd_lcm.v-4'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#503-512' title='goto source code'>[src]</a></h4><h4 id='method.lcm-3' class="method"><code id='lcm.v-4'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#517-519' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and
<code>other</code>.</p>
</div><h4 id='method.gcd_lcm-4' class="method"><code id='gcd_lcm.v-4'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#524-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-3' class="method"><code id='divides.v-4'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#536-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-3' class="method"><code id='is_multiple_of.v-4'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#542-544' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-3' class="method"><code id='is_even.v-4'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#548-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code></p>
</div><h4 id='method.is_odd-3' class="method"><code id='is_odd.v-4'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code></p>
</div><h4 id='method.div_rem-3' class="method"><code id='div_rem.v-4'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#560-562' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-isize' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.isize.html">isize</a></code><a href='#impl-Integer-for-isize' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#406-563' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-4' class="method"><code id='div_floor.v-5'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#409-418' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer division</p>
</div><h4 id='method.mod_floor-4' class="method"><code id='mod_floor.v-5'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#422-431' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer modulo</p>
</div><h4 id='method.div_mod_floor-5' class="method"><code id='div_mod_floor.v-5'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#435-444' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates <code>div_floor</code> and <code>mod_floor</code> simultaneously</p>
</div><h4 id='method.div_ceil-5' class="method hidden"><code id='div_ceil.v-5'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#447-454' title='goto source code'>[src]</a></h4><h4 id='method.gcd-4' class="method"><code id='gcd.v-5'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#459-500' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and
<code>other</code>. The result is always positive.</p>
</div><h4 id='method.extended_gcd_lcm-5' class="method hidden"><code id='extended_gcd_lcm.v-5'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#503-512' title='goto source code'>[src]</a></h4><h4 id='method.lcm-4' class="method"><code id='lcm.v-5'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#517-519' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and
<code>other</code>.</p>
</div><h4 id='method.gcd_lcm-5' class="method"><code id='gcd_lcm.v-5'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#524-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-4' class="method"><code id='divides.v-5'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#536-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-4' class="method"><code id='is_multiple_of.v-5'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#542-544' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-4' class="method"><code id='is_even.v-5'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#548-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code></p>
</div><h4 id='method.is_odd-4' class="method"><code id='is_odd.v-5'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code></p>
</div><h4 id='method.div_rem-4' class="method"><code id='div_rem.v-5'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#560-562' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-i128' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a></code><a href='#impl-Integer-for-i128' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#406-563' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-5' class="method"><code id='div_floor.v-6'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#409-418' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer division</p>
</div><h4 id='method.mod_floor-5' class="method"><code id='mod_floor.v-6'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#422-431' title='goto source code'>[src]</a></h4><div class='docblock'><p>Floored integer modulo</p>
</div><h4 id='method.div_mod_floor-6' class="method"><code id='div_mod_floor.v-6'>fn <a href='#method.div_mod_floor' class='fnname'>div_mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#435-444' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates <code>div_floor</code> and <code>mod_floor</code> simultaneously</p>
</div><h4 id='method.div_ceil-6' class="method hidden"><code id='div_ceil.v-6'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#447-454' title='goto source code'>[src]</a></h4><h4 id='method.gcd-5' class="method"><code id='gcd.v-6'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#459-500' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and
<code>other</code>. The result is always positive.</p>
</div><h4 id='method.extended_gcd_lcm-6' class="method hidden"><code id='extended_gcd_lcm.v-6'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#503-512' title='goto source code'>[src]</a></h4><h4 id='method.lcm-5' class="method"><code id='lcm.v-6'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#517-519' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and
<code>other</code>.</p>
</div><h4 id='method.gcd_lcm-6' class="method"><code id='gcd_lcm.v-6'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#524-532' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-5' class="method"><code id='divides.v-6'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#536-538' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-5' class="method"><code id='is_multiple_of.v-6'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#542-544' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-5' class="method"><code id='is_even.v-6'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#548-550' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code></p>
</div><h4 id='method.is_odd-5' class="method"><code id='is_odd.v-6'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#554-556' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code></p>
</div><h4 id='method.div_rem-5' class="method"><code id='div_rem.v-6'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#560-562' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-u8' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a></code><a href='#impl-Integer-for-u8' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#798-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-6' class="method"><code id='div_floor.v-7'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#801-803' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer division. Returns the same result as <code>div</code> (<code>/</code>).</p>
</div><h4 id='method.mod_floor-6' class="method"><code id='mod_floor.v-7'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#807-809' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer modulo operation. Returns the same result as <code>rem</code> (<code>%</code>).</p>
</div><h4 id='method.div_ceil-7' class="method hidden"><code id='div_ceil.v-7'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#812-814' title='goto source code'>[src]</a></h4><h4 id='method.gcd-6' class="method"><code id='gcd.v-7'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#818-843' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and <code>other</code></p>
</div><h4 id='method.extended_gcd_lcm-7' class="method hidden"><code id='extended_gcd_lcm.v-7'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#846-855' title='goto source code'>[src]</a></h4><h4 id='method.lcm-6' class="method"><code id='lcm.v-7'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#859-861' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.gcd_lcm-7' class="method"><code id='gcd_lcm.v-7'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#866-873' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-6' class="method"><code id='divides.v-7'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#877-879' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-6' class="method"><code id='is_multiple_of.v-7'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#883-885' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-6' class="method"><code id='is_even.v-7'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#889-891' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code>.</p>
</div><h4 id='method.is_odd-6' class="method"><code id='is_odd.v-7'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#895-897' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code>.</p>
</div><h4 id='method.div_rem-6' class="method"><code id='div_rem.v-7'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-u16' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a></code><a href='#impl-Integer-for-u16' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#798-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-7' class="method"><code id='div_floor.v-8'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#801-803' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer division. Returns the same result as <code>div</code> (<code>/</code>).</p>
</div><h4 id='method.mod_floor-7' class="method"><code id='mod_floor.v-8'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#807-809' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer modulo operation. Returns the same result as <code>rem</code> (<code>%</code>).</p>
</div><h4 id='method.div_ceil-8' class="method hidden"><code id='div_ceil.v-8'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#812-814' title='goto source code'>[src]</a></h4><h4 id='method.gcd-7' class="method"><code id='gcd.v-8'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#818-843' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and <code>other</code></p>
</div><h4 id='method.extended_gcd_lcm-8' class="method hidden"><code id='extended_gcd_lcm.v-8'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#846-855' title='goto source code'>[src]</a></h4><h4 id='method.lcm-7' class="method"><code id='lcm.v-8'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#859-861' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.gcd_lcm-8' class="method"><code id='gcd_lcm.v-8'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#866-873' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-7' class="method"><code id='divides.v-8'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#877-879' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-7' class="method"><code id='is_multiple_of.v-8'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#883-885' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-7' class="method"><code id='is_even.v-8'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#889-891' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code>.</p>
</div><h4 id='method.is_odd-7' class="method"><code id='is_odd.v-8'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#895-897' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code>.</p>
</div><h4 id='method.div_rem-7' class="method"><code id='div_rem.v-8'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-u32' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code><a href='#impl-Integer-for-u32' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#798-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-8' class="method"><code id='div_floor.v-9'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#801-803' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer division. Returns the same result as <code>div</code> (<code>/</code>).</p>
</div><h4 id='method.mod_floor-8' class="method"><code id='mod_floor.v-9'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#807-809' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer modulo operation. Returns the same result as <code>rem</code> (<code>%</code>).</p>
</div><h4 id='method.div_ceil-9' class="method hidden"><code id='div_ceil.v-9'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#812-814' title='goto source code'>[src]</a></h4><h4 id='method.gcd-8' class="method"><code id='gcd.v-9'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#818-843' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and <code>other</code></p>
</div><h4 id='method.extended_gcd_lcm-9' class="method hidden"><code id='extended_gcd_lcm.v-9'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#846-855' title='goto source code'>[src]</a></h4><h4 id='method.lcm-8' class="method"><code id='lcm.v-9'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#859-861' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.gcd_lcm-9' class="method"><code id='gcd_lcm.v-9'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#866-873' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-8' class="method"><code id='divides.v-9'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#877-879' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-8' class="method"><code id='is_multiple_of.v-9'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#883-885' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-8' class="method"><code id='is_even.v-9'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#889-891' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code>.</p>
</div><h4 id='method.is_odd-8' class="method"><code id='is_odd.v-9'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#895-897' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code>.</p>
</div><h4 id='method.div_rem-8' class="method"><code id='div_rem.v-9'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-u64' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a href='#impl-Integer-for-u64' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#798-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-9' class="method"><code id='div_floor.v-10'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#801-803' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer division. Returns the same result as <code>div</code> (<code>/</code>).</p>
</div><h4 id='method.mod_floor-9' class="method"><code id='mod_floor.v-10'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#807-809' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer modulo operation. Returns the same result as <code>rem</code> (<code>%</code>).</p>
</div><h4 id='method.div_ceil-10' class="method hidden"><code id='div_ceil.v-10'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#812-814' title='goto source code'>[src]</a></h4><h4 id='method.gcd-9' class="method"><code id='gcd.v-10'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#818-843' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and <code>other</code></p>
</div><h4 id='method.extended_gcd_lcm-10' class="method hidden"><code id='extended_gcd_lcm.v-10'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#846-855' title='goto source code'>[src]</a></h4><h4 id='method.lcm-9' class="method"><code id='lcm.v-10'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#859-861' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.gcd_lcm-10' class="method"><code id='gcd_lcm.v-10'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#866-873' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-9' class="method"><code id='divides.v-10'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#877-879' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-9' class="method"><code id='is_multiple_of.v-10'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#883-885' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-9' class="method"><code id='is_even.v-10'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#889-891' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code>.</p>
</div><h4 id='method.is_odd-9' class="method"><code id='is_odd.v-10'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#895-897' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code>.</p>
</div><h4 id='method.div_rem-9' class="method"><code id='div_rem.v-10'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-usize' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a href='#impl-Integer-for-usize' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#798-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-10' class="method"><code id='div_floor.v-11'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#801-803' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer division. Returns the same result as <code>div</code> (<code>/</code>).</p>
</div><h4 id='method.mod_floor-10' class="method"><code id='mod_floor.v-11'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#807-809' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer modulo operation. Returns the same result as <code>rem</code> (<code>%</code>).</p>
</div><h4 id='method.div_ceil-11' class="method hidden"><code id='div_ceil.v-11'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#812-814' title='goto source code'>[src]</a></h4><h4 id='method.gcd-10' class="method"><code id='gcd.v-11'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#818-843' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and <code>other</code></p>
</div><h4 id='method.extended_gcd_lcm-11' class="method hidden"><code id='extended_gcd_lcm.v-11'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#846-855' title='goto source code'>[src]</a></h4><h4 id='method.lcm-10' class="method"><code id='lcm.v-11'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#859-861' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.gcd_lcm-11' class="method"><code id='gcd_lcm.v-11'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#866-873' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-10' class="method"><code id='divides.v-11'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#877-879' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-10' class="method"><code id='is_multiple_of.v-11'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#883-885' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-10' class="method"><code id='is_even.v-11'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#889-891' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code>.</p>
</div><h4 id='method.is_odd-10' class="method"><code id='is_odd.v-11'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#895-897' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code>.</p>
</div><h4 id='method.div_rem-10' class="method"><code id='div_rem.v-11'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-for-u128' class='impl'><code class='in-band'>impl <a class="trait" href="../num_integer/trait.Integer.html" title="trait num_integer::Integer">Integer</a> for <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a></code><a href='#impl-Integer-for-u128' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#798-904' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.div_floor-11' class="method"><code id='div_floor.v-12'>fn <a href='#method.div_floor' class='fnname'>div_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#801-803' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer division. Returns the same result as <code>div</code> (<code>/</code>).</p>
</div><h4 id='method.mod_floor-11' class="method"><code id='mod_floor.v-12'>fn <a href='#method.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#807-809' title='goto source code'>[src]</a></h4><div class='docblock'><p>Unsigned integer modulo operation. Returns the same result as <code>rem</code> (<code>%</code>).</p>
</div><h4 id='method.div_ceil-12' class="method hidden"><code id='div_ceil.v-12'>fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#812-814' title='goto source code'>[src]</a></h4><h4 id='method.gcd-11' class="method"><code id='gcd.v-12'>fn <a href='#method.gcd' class='fnname'>gcd</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#818-843' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) of the number and <code>other</code></p>
</div><h4 id='method.extended_gcd_lcm-12' class="method hidden"><code id='extended_gcd_lcm.v-12'>fn <a href='#method.extended_gcd_lcm' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#846-855' title='goto source code'>[src]</a></h4><h4 id='method.lcm-11' class="method"><code id='lcm.v-12'>fn <a href='#method.lcm' class='fnname'>lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#859-861' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.gcd_lcm-12' class="method"><code id='gcd_lcm.v-12'>fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#866-873' title='goto source code'>[src]</a></h4><div class='docblock'><p>Calculates the Greatest Common Divisor (GCD) and
Lowest Common Multiple (LCM) of the number and <code>other</code>.</p>
</div><h4 id='method.divides-11' class="method"><code id='divides.v-12'>fn <a href='#method.divides' class='fnname'>divides</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#877-879' title='goto source code'>[src]</a></h4><div class='docblock'><p>Deprecated, use <code>is_multiple_of</code> instead.</p>
</div><h4 id='method.is_multiple_of-11' class="method"><code id='is_multiple_of.v-12'>fn <a href='#method.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#883-885' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is a multiple of <code>other</code>.</p>
</div><h4 id='method.is_even-11' class="method"><code id='is_even.v-12'>fn <a href='#method.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#889-891' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is divisible by <code>2</code>.</p>
</div><h4 id='method.is_odd-11' class="method"><code id='is_odd.v-12'>fn <a href='#method.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#895-897' title='goto source code'>[src]</a></h4><div class='docblock'><p>Returns <code>true</code> if the number is not divisible by <code>2</code>.</p>
</div><h4 id='method.div_rem-11' class="method"><code id='div_rem.v-12'>fn <a href='#method.div_rem' class='fnname'>div_rem</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>Self, Self<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code><a class='srclink' href='../src/num_integer/lib.rs.html#901-903' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
src="../implementors/num_integer/trait.Integer.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "num_integer";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>