72 lines
36 KiB
HTML
72 lines
36 KiB
HTML
<!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="Provides methods to compute an integer’s square root, cube root, and arbitrary `n`th root."><meta name="keywords" content="rust, rustlang, rust-lang, Roots"><title>Roots in num_integer - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><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="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
|
||
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a class="sidebar-logo" href="../num_integer/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.png" alt="logo"></div>
|
||
</a><h2 class="location">Trait Roots</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#required-methods">Required Methods</a></h3><div class="sidebar-links"><a href="#tymethod.nth_root">nth_root</a></div><h3 class="sidebar-title"><a href="#provided-methods">Provided Methods</a></h3><div class="sidebar-links"><a href="#method.cbrt">cbrt</a><a href="#method.sqrt">sqrt</a></div><h3 class="sidebar-title"><a href="#foreign-impls">Implementations on Foreign Types</a></h3><div class="sidebar-links"><a href="#impl-Roots-for-i128">i128</a><a href="#impl-Roots-for-i16">i16</a><a href="#impl-Roots-for-i32">i32</a><a href="#impl-Roots-for-i64">i64</a><a href="#impl-Roots-for-i8">i8</a><a href="#impl-Roots-for-isize">isize</a><a href="#impl-Roots-for-u128">u128</a><a href="#impl-Roots-for-u16">u16</a><a href="#impl-Roots-for-u32">u32</a><a href="#impl-Roots-for-u64">u64</a><a href="#impl-Roots-for-u8">u8</a><a href="#impl-Roots-for-usize">usize</a></div><h3 class="sidebar-title"><a href="#implementors">Implementors</a></h3></div><h2 class="location">Other items in<br><a href="index.html">num_integer</a></h2><div id="sidebar-vars" data-name="Roots" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../num_integer/index.html"><img class="rust-logo" src="../rust-logo.png" alt="logo"></a><nav class="sub"><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><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" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><h1 class="fqn"><span class="in-band">Trait <a href="index.html">num_integer</a>::<wbr><a class="trait" href="#">Roots</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><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">−</span>]</a></span><a class="srclink" href="../src/num_integer/roots.rs.html#9-111" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust trait"><code>pub trait Roots: <a class="trait" href="trait.Integer.html" title="trait num_integer::Integer">Integer</a> {
|
||
fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self;
|
||
|
||
fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self { ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self { ... }
|
||
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Provides methods to compute an integer’s square root, cube root,
|
||
and arbitrary <code>n</code>th root.</p>
|
||
</div></details><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="tymethod.nth_root" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#55" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div></summary><div class="docblock"><p>Returns the truncated principal <code>n</code>th root of an integer
|
||
– <code>if x >= 0 { ⌊ⁿ√x⌋ } else { ⌈ⁿ√x⌉ }</code></p>
|
||
<p>This is solving for <code>r</code> in <code>rⁿ = x</code>, rounding toward zero.
|
||
If <code>x</code> is positive, the result will satisfy <code>rⁿ ≤ x < (r+1)ⁿ</code>.
|
||
If <code>x</code> is negative and <code>n</code> is odd, then <code>(r-1)ⁿ < x ≤ rⁿ</code>.</p>
|
||
<h5 id="panics" class="section-header"><a href="#panics">Panics</a></h5>
|
||
<p>Panics if <code>n</code> is zero:</p>
|
||
|
||
<div class='information'><div class='tooltip should_panic'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered should_panic"><code><span class="macro">println!</span>(<span class="string">"can't compute ⁰√x : {}"</span>, <span class="number">123</span>.<span class="ident">nth_root</span>(<span class="number">0</span>));</code></pre></div>
|
||
<p>or if <code>n</code> is even and <code>self</code> is negative:</p>
|
||
|
||
<div class='information'><div class='tooltip should_panic'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered should_panic"><code><span class="macro">println!</span>(<span class="string">"no imaginary numbers... {}"</span>, (<span class="op">-</span><span class="number">1</span>).<span class="ident">nth_root</span>(<span class="number">10</span>));</code></pre></div>
|
||
<h5 id="examples" class="section-header"><a href="#examples">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">num_integer::Roots</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">x</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="number">12345</span>;
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="number">1</span>), <span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="number">2</span>), <span class="ident">x</span>.<span class="ident">sqrt</span>());
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="number">3</span>), <span class="ident">x</span>.<span class="ident">cbrt</span>());
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="number">4</span>), <span class="number">10</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="number">13</span>), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="number">14</span>), <span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">x</span>.<span class="ident">nth_root</span>(<span class="ident">std::u32::MAX</span>), <span class="number">1</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">std::i32::MAX</span>.<span class="ident">nth_root</span>(<span class="number">30</span>), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">std::i32::MAX</span>.<span class="ident">nth_root</span>(<span class="number">31</span>), <span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">std::i32::MIN</span>.<span class="ident">nth_root</span>(<span class="number">31</span>), <span class="op">-</span><span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="ident">std::i32::MIN</span> <span class="op">+</span> <span class="number">1</span>).<span class="ident">nth_root</span>(<span class="number">31</span>), <span class="op">-</span><span class="number">1</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(<span class="ident">std::u32::MAX</span>.<span class="ident">nth_root</span>(<span class="number">31</span>), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(<span class="ident">std::u32::MAX</span>.<span class="ident">nth_root</span>(<span class="number">32</span>), <span class="number">1</span>);</code></pre></div>
|
||
</div></details></div><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><details class="rustdoc-toggle" open><summary><div id="method.sqrt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#82-84" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div></summary><div class="docblock"><p>Returns the truncated principal square root of an integer – <code>⌊√x⌋</code></p>
|
||
<p>This is solving for <code>r</code> in <code>r² = x</code>, rounding toward zero.
|
||
The result will satisfy <code>r² ≤ x < (r+1)²</code>.</p>
|
||
<h5 id="panics-1" class="section-header"><a href="#panics-1">Panics</a></h5>
|
||
<p>Panics if <code>self</code> is less than zero:</p>
|
||
|
||
<div class='information'><div class='tooltip should_panic'>ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered should_panic"><code><span class="macro">println!</span>(<span class="string">"no imaginary numbers... {}"</span>, (<span class="op">-</span><span class="number">1</span>).<span class="ident">sqrt</span>());</code></pre></div>
|
||
<h5 id="examples-1" class="section-header"><a href="#examples-1">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">num_integer::Roots</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">x</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="number">12345</span>;
|
||
<span class="macro">assert_eq!</span>((<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span>).<span class="ident">sqrt</span>(), <span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">1</span>).<span class="ident">sqrt</span>(), <span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">-</span> <span class="number">1</span>).<span class="ident">sqrt</span>(), <span class="ident">x</span> <span class="op">-</span> <span class="number">1</span>);</code></pre></div>
|
||
</div></details><details class="rustdoc-toggle" open><summary><div id="method.cbrt" class="method has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#108-110" title="goto source code">[src]</a></div><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></summary><div class="docblock"><p>Returns the truncated principal cube root of an integer –
|
||
<code>if x >= 0 { ⌊∛x⌋ } else { ⌈∛x⌉ }</code></p>
|
||
<p>This is solving for <code>r</code> in <code>r³ = x</code>, rounding toward zero.
|
||
If <code>x</code> is positive, the result will satisfy <code>r³ ≤ x < (r+1)³</code>.
|
||
If <code>x</code> is negative, then <code>(r-1)³ < x ≤ r³</code>.</p>
|
||
<h5 id="examples-2" class="section-header"><a href="#examples-2">Examples</a></h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use</span> <span class="ident">num_integer::Roots</span>;
|
||
|
||
<span class="kw">let</span> <span class="ident">x</span>: <span class="ident">i32</span> <span class="op">=</span> <span class="number">1234</span>;
|
||
<span class="macro">assert_eq!</span>((<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span>).<span class="ident">cbrt</span>(), <span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">1</span>).<span class="ident">cbrt</span>(), <span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">-</span> <span class="number">1</span>).<span class="ident">cbrt</span>(), <span class="ident">x</span> <span class="op">-</span> <span class="number">1</span>);
|
||
|
||
<span class="macro">assert_eq!</span>((<span class="op">-</span>(<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span>)).<span class="ident">cbrt</span>(), <span class="op">-</span><span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="op">-</span>(<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">+</span> <span class="number">1</span>)).<span class="ident">cbrt</span>(), <span class="op">-</span><span class="ident">x</span>);
|
||
<span class="macro">assert_eq!</span>((<span class="op">-</span>(<span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">*</span> <span class="ident">x</span> <span class="op">-</span> <span class="number">1</span>)).<span class="ident">cbrt</span>(), <span class="op">-</span>(<span class="ident">x</span> <span class="op">-</span> <span class="number">1</span>));</code></pre></div>
|
||
</div></details></div><h2 id="foreign-impls" class="small-section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor"></a></h2><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-i8" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#165" title="goto source code">[src]</a></div><a href="#impl-Roots-for-i8" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i8.html">i8</a></h3></div></summary><div class="impl-items"><div id="method.nth_root" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#165" title="goto source code">[src]</a></div><a href="#method.nth_root" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#165" title="goto source code">[src]</a></div><a href="#method.sqrt-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#165" title="goto source code">[src]</a></div><a href="#method.cbrt-1" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-i16" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#166" title="goto source code">[src]</a></div><a href="#impl-Roots-for-i16" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i16.html">i16</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#166" title="goto source code">[src]</a></div><a href="#method.nth_root-1" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-2" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#166" title="goto source code">[src]</a></div><a href="#method.sqrt-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-2" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#166" title="goto source code">[src]</a></div><a href="#method.cbrt-2" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-i32" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#167" title="goto source code">[src]</a></div><a href="#impl-Roots-for-i32" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i32.html">i32</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-2" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#167" title="goto source code">[src]</a></div><a href="#method.nth_root-2" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-3" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#167" title="goto source code">[src]</a></div><a href="#method.sqrt-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-3" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#167" title="goto source code">[src]</a></div><a href="#method.cbrt-3" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-i64" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#168" title="goto source code">[src]</a></div><a href="#impl-Roots-for-i64" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i64.html">i64</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-3" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#168" title="goto source code">[src]</a></div><a href="#method.nth_root-3" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-4" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#168" title="goto source code">[src]</a></div><a href="#method.sqrt-4" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-4" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#168" title="goto source code">[src]</a></div><a href="#method.cbrt-4" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-i128" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#170" title="goto source code">[src]</a></div><a href="#impl-Roots-for-i128" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.i128.html">i128</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-4" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#170" title="goto source code">[src]</a></div><a href="#method.nth_root-4" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-5" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#170" title="goto source code">[src]</a></div><a href="#method.sqrt-5" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-5" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#170" title="goto source code">[src]</a></div><a href="#method.cbrt-5" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-isize" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#171" title="goto source code">[src]</a></div><a href="#impl-Roots-for-isize" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.isize.html">isize</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-5" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#171" title="goto source code">[src]</a></div><a href="#method.nth_root-5" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-6" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#171" title="goto source code">[src]</a></div><a href="#method.sqrt-6" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-6" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#171" title="goto source code">[src]</a></div><a href="#method.cbrt-6" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-u8" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#385" title="goto source code">[src]</a></div><a href="#impl-Roots-for-u8" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u8.html">u8</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-6" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#385" title="goto source code">[src]</a></div><a href="#method.nth_root-6" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-7" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#385" title="goto source code">[src]</a></div><a href="#method.sqrt-7" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-7" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#385" title="goto source code">[src]</a></div><a href="#method.cbrt-7" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-u16" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#386" title="goto source code">[src]</a></div><a href="#impl-Roots-for-u16" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u16.html">u16</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-7" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#386" title="goto source code">[src]</a></div><a href="#method.nth_root-7" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-8" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#386" title="goto source code">[src]</a></div><a href="#method.sqrt-8" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-8" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#386" title="goto source code">[src]</a></div><a href="#method.cbrt-8" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-u32" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#387" title="goto source code">[src]</a></div><a href="#impl-Roots-for-u32" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-8" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#387" title="goto source code">[src]</a></div><a href="#method.nth_root-8" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-9" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#387" title="goto source code">[src]</a></div><a href="#method.sqrt-9" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-9" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#387" title="goto source code">[src]</a></div><a href="#method.cbrt-9" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-u64" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#388" title="goto source code">[src]</a></div><a href="#impl-Roots-for-u64" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u64.html">u64</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-9" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#388" title="goto source code">[src]</a></div><a href="#method.nth_root-9" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-10" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#388" title="goto source code">[src]</a></div><a href="#method.sqrt-10" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-10" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#388" title="goto source code">[src]</a></div><a href="#method.cbrt-10" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-u128" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#390" title="goto source code">[src]</a></div><a href="#impl-Roots-for-u128" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u128.html">u128</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-10" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#390" title="goto source code">[src]</a></div><a href="#method.nth_root-10" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-11" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#390" title="goto source code">[src]</a></div><a href="#method.sqrt-11" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-11" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#390" title="goto source code">[src]</a></div><a href="#method.cbrt-11" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><details class="rustdoc-toggle implementors-toggle"><summary><div id="impl-Roots-for-usize" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#391" title="goto source code">[src]</a></div><a href="#impl-Roots-for-usize" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="trait.Roots.html" title="trait num_integer::Roots">Roots</a> for <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.usize.html">usize</a></h3></div></summary><div class="impl-items"><div id="method.nth_root-11" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#391" title="goto source code">[src]</a></div><a href="#method.nth_root-11" class="anchor"></a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fnname">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.59.0/std/primitive.u32.html">u32</a>) -> Self</h4></div><div id="method.sqrt-12" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#391" title="goto source code">[src]</a></div><a href="#method.sqrt-12" class="anchor"></a><h4 class="code-header">fn <a href="#method.sqrt" class="fnname">sqrt</a>(&self) -> Self</h4></div><div id="method.cbrt-12" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../src/num_integer/roots.rs.html#391" title="goto source code">[src]</a></div><a href="#method.cbrt-12" class="anchor"></a><h4 class="code-header">fn <a href="#method.cbrt" class="fnname">cbrt</a>(&self) -> Self</h4></div></div></details><h2 id="implementors" class="small-section-header">Implementors<a href="#implementors" class="anchor"></a></h2><div class="item-list" id="implementors-list"></div><script type="text/javascript" src="../implementors/num_integer/trait.Roots.js" async></script></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="num_integer" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.59.0 (9d1b2106e 2022-02-23)" ></div>
|
||
</body></html> |