Files
mercator_service/num_integer/trait.Integer.html

312 lines
96 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="#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"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled 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-342' 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: &amp;Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.mod_floor' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.gcd' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.lcm' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self;
<div class='item-spacer'></div> fn <a href='#tymethod.divides' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool;
<div class='item-spacer'></div> fn <a href='#tymethod.is_multiple_of' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool;
<div class='item-spacer'></div> fn <a href='#tymethod.is_even' class='fnname'>is_even</a>(&amp;self) -&gt; bool;
<div class='item-spacer'></div> fn <a href='#tymethod.is_odd' class='fnname'>is_odd</a>(&amp;self) -&gt; bool;
<div class='item-spacer'></div> fn <a href='#tymethod.div_rem' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self);
fn <a href='#method.div_ceil' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self { ... }
<div class='item-spacer'></div> fn <a href='#method.gcd_lcm' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self) { ... }
<div class='item-spacer'></div> fn <a href='#method.extended_gcd' class='fnname'>extended_gcd</a>(&amp;self, other: &amp;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: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;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> + <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: &amp;Self) -&gt; (Self, Self) { ... }
<div class='item-spacer'></div> fn <a href='#method.next_multiple_of' class='fnname'>next_multiple_of</a>(&amp;self, other: &amp;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: &amp;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: &amp;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: &amp;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: &amp;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: &amp;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: &amp;Self) -&gt; bool</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: &amp;Self) -&gt; bool</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; bool</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; bool</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: &amp;Self) -&gt; (Self, Self)</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: &amp;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: &amp;Self) -&gt; (Self, Self)</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: &amp;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: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;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> + <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: &amp;Self) -&gt; (Self, Self)</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: &amp;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: &amp;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='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Integer' class='impl'><code class='in-band'>impl Integer for i8</code><a href='#impl-Integer' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#405-562' 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: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#408-417' 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: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#421-430' 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-1' class='fnname'>div_mod_floor</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#434-443' 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-1' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#446-453' 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: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#458-499' 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-1' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#502-511' 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: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#516-518' 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-1' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#523-531' 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: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#535-537' 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: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#541-543' 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; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#547-549' 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; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#553-555' 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: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-1' class='impl'><code class='in-band'>impl Integer for i16</code><a href='#impl-Integer-1' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#405-562' 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-1' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#408-417' 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-1' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#421-430' 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-2' class='fnname'>div_mod_floor</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#434-443' 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-2' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#446-453' title='goto source code'>[src]</a></h4><h4 id='method.gcd-1' class="method"><code id='gcd.v-2'>fn <a href='#method.gcd-1' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#458-499' 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-2' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#502-511' title='goto source code'>[src]</a></h4><h4 id='method.lcm-1' class="method"><code id='lcm.v-2'>fn <a href='#method.lcm-1' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#516-518' 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-2' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#523-531' 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-1' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#535-537' 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-1' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#541-543' 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-1' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#547-549' 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-1' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#553-555' 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-1' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-2' class='impl'><code class='in-band'>impl Integer for i32</code><a href='#impl-Integer-2' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#405-562' 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-2' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#408-417' 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-2' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#421-430' 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-3' class='fnname'>div_mod_floor</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#434-443' 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-3' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#446-453' title='goto source code'>[src]</a></h4><h4 id='method.gcd-2' class="method"><code id='gcd.v-3'>fn <a href='#method.gcd-2' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#458-499' 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-3' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#502-511' title='goto source code'>[src]</a></h4><h4 id='method.lcm-2' class="method"><code id='lcm.v-3'>fn <a href='#method.lcm-2' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#516-518' 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-3' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#523-531' 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-2' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#535-537' 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-2' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#541-543' 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-2' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#547-549' 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-2' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#553-555' 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-2' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-3' class='impl'><code class='in-band'>impl Integer for i64</code><a href='#impl-Integer-3' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#405-562' 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-3' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#408-417' 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-3' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#421-430' 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-4' class='fnname'>div_mod_floor</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#434-443' 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-4' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#446-453' title='goto source code'>[src]</a></h4><h4 id='method.gcd-3' class="method"><code id='gcd.v-4'>fn <a href='#method.gcd-3' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#458-499' 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-4' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#502-511' title='goto source code'>[src]</a></h4><h4 id='method.lcm-3' class="method"><code id='lcm.v-4'>fn <a href='#method.lcm-3' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#516-518' 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-4' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#523-531' 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-3' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#535-537' 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-3' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#541-543' 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-3' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#547-549' 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-3' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#553-555' 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-3' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-4' class='impl'><code class='in-band'>impl Integer for i128</code><a href='#impl-Integer-4' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#405-562' 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-4' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#408-417' 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-4' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#421-430' 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-5' class='fnname'>div_mod_floor</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#434-443' 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-5' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#446-453' title='goto source code'>[src]</a></h4><h4 id='method.gcd-4' class="method"><code id='gcd.v-5'>fn <a href='#method.gcd-4' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#458-499' 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-5' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#502-511' title='goto source code'>[src]</a></h4><h4 id='method.lcm-4' class="method"><code id='lcm.v-5'>fn <a href='#method.lcm-4' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#516-518' 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-5' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#523-531' 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-4' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#535-537' 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-4' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#541-543' 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-4' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#547-549' 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-4' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#553-555' 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-4' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-5' class='impl'><code class='in-band'>impl Integer for isize</code><a href='#impl-Integer-5' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#405-562' 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-5' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#408-417' 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-5' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#421-430' 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-6' class='fnname'>div_mod_floor</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#434-443' 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-6' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#446-453' title='goto source code'>[src]</a></h4><h4 id='method.gcd-5' class="method"><code id='gcd.v-6'>fn <a href='#method.gcd-5' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#458-499' 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-6' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#502-511' title='goto source code'>[src]</a></h4><h4 id='method.lcm-5' class="method"><code id='lcm.v-6'>fn <a href='#method.lcm-5' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#516-518' 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-6' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#523-531' 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-5' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#535-537' 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-5' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#541-543' 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-5' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#547-549' 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-5' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#553-555' 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-5' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#559-561' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-6' class='impl'><code class='in-band'>impl Integer for u8</code><a href='#impl-Integer-6' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#797-903' 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-6' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#800-802' 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-6' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#806-808' 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-7' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#811-813' title='goto source code'>[src]</a></h4><h4 id='method.gcd-6' class="method"><code id='gcd.v-7'>fn <a href='#method.gcd-6' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#817-842' 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-7' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#845-854' title='goto source code'>[src]</a></h4><h4 id='method.lcm-6' class="method"><code id='lcm.v-7'>fn <a href='#method.lcm-6' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#858-860' 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-7' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#865-872' 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-6' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#876-878' 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-6' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#882-884' 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-6' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#888-890' 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-6' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#894-896' 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-6' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#900-902' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-7' class='impl'><code class='in-band'>impl Integer for u16</code><a href='#impl-Integer-7' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#797-903' 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-7' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#800-802' 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-7' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#806-808' 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-8' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#811-813' title='goto source code'>[src]</a></h4><h4 id='method.gcd-7' class="method"><code id='gcd.v-8'>fn <a href='#method.gcd-7' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#817-842' 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-8' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#845-854' title='goto source code'>[src]</a></h4><h4 id='method.lcm-7' class="method"><code id='lcm.v-8'>fn <a href='#method.lcm-7' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#858-860' 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-8' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#865-872' 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-7' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#876-878' 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-7' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#882-884' 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-7' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#888-890' 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-7' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#894-896' 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-7' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#900-902' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-8' class='impl'><code class='in-band'>impl Integer for u32</code><a href='#impl-Integer-8' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#797-903' 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-8' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#800-802' 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-8' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#806-808' 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-9' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#811-813' title='goto source code'>[src]</a></h4><h4 id='method.gcd-8' class="method"><code id='gcd.v-9'>fn <a href='#method.gcd-8' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#817-842' 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-9' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#845-854' title='goto source code'>[src]</a></h4><h4 id='method.lcm-8' class="method"><code id='lcm.v-9'>fn <a href='#method.lcm-8' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#858-860' 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-9' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#865-872' 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-8' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#876-878' 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-8' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#882-884' 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-8' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#888-890' 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-8' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#894-896' 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-8' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#900-902' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-9' class='impl'><code class='in-band'>impl Integer for u64</code><a href='#impl-Integer-9' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#797-903' 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-9' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#800-802' 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-9' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#806-808' 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-10' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#811-813' title='goto source code'>[src]</a></h4><h4 id='method.gcd-9' class="method"><code id='gcd.v-10'>fn <a href='#method.gcd-9' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#817-842' 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-10' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#845-854' title='goto source code'>[src]</a></h4><h4 id='method.lcm-9' class="method"><code id='lcm.v-10'>fn <a href='#method.lcm-9' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#858-860' 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-10' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#865-872' 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-9' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#876-878' 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-9' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#882-884' 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-9' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#888-890' 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-9' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#894-896' 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-9' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#900-902' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-10' class='impl'><code class='in-band'>impl Integer for u128</code><a href='#impl-Integer-10' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#797-903' 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-10' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#800-802' 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-10' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#806-808' 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-11' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#811-813' title='goto source code'>[src]</a></h4><h4 id='method.gcd-10' class="method"><code id='gcd.v-11'>fn <a href='#method.gcd-10' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#817-842' 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-11' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#845-854' title='goto source code'>[src]</a></h4><h4 id='method.lcm-10' class="method"><code id='lcm.v-11'>fn <a href='#method.lcm-10' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#858-860' 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-11' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#865-872' 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-10' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#876-878' 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-10' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#882-884' 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-10' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#888-890' 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-10' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#894-896' 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-10' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#900-902' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div><h3 id='impl-Integer-11' class='impl'><code class='in-band'>impl Integer for usize</code><a href='#impl-Integer-11' class='anchor'></a><a class='srclink' href='../src/num_integer/lib.rs.html#797-903' 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-11' class='fnname'>div_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#800-802' 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-11' class='fnname'>mod_floor</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#806-808' 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-12' class='fnname'>div_ceil</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#811-813' title='goto source code'>[src]</a></h4><h4 id='method.gcd-11' class="method"><code id='gcd.v-12'>fn <a href='#method.gcd-11' class='fnname'>gcd</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#817-842' 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-12' class='fnname'>extended_gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (<a class="struct" href="../num_integer/struct.ExtendedGcd.html" title="struct num_integer::ExtendedGcd">ExtendedGcd</a>&lt;Self&gt;, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#845-854' title='goto source code'>[src]</a></h4><h4 id='method.lcm-11' class="method"><code id='lcm.v-12'>fn <a href='#method.lcm-11' class='fnname'>lcm</a>(&amp;self, other: &amp;Self) -&gt; Self</code><a class='srclink' href='../src/num_integer/lib.rs.html#858-860' 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-12' class='fnname'>gcd_lcm</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#865-872' 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-11' class='fnname'>divides</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#876-878' 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-11' class='fnname'>is_multiple_of</a>(&amp;self, other: &amp;Self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#882-884' 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-11' class='fnname'>is_even</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#888-890' 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-11' class='fnname'>is_odd</a>(&amp;self) -&gt; bool</code><a class='srclink' href='../src/num_integer/lib.rs.html#894-896' 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-11' class='fnname'>div_rem</a>(&amp;self, other: &amp;Self) -&gt; (Self, Self)</code><a class='srclink' href='../src/num_integer/lib.rs.html#900-902' title='goto source code'>[src]</a></h4><div class='docblock'><p>Simultaneous truncated integer division and modulus.</p>
</div></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript" src="../implementors/num_integer/trait.Integer.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><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>