71 lines
30 KiB
HTML
71 lines
30 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."><title>Roots in num_integer - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="num_integer" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.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="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../num_integer/index.html">num_<wbr>integer</a><span class="version">0.1.46</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Roots</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.nth_root" title="nth_root">nth_root</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.cbrt" title="cbrt">cbrt</a></li><li><a href="#method.sqrt" title="sqrt">sqrt</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-Roots-for-i128" title="i128">i128</a></li><li><a href="#impl-Roots-for-i16" title="i16">i16</a></li><li><a href="#impl-Roots-for-i32" title="i32">i32</a></li><li><a href="#impl-Roots-for-i64" title="i64">i64</a></li><li><a href="#impl-Roots-for-i8" title="i8">i8</a></li><li><a href="#impl-Roots-for-isize" title="isize">isize</a></li><li><a href="#impl-Roots-for-u128" title="u128">u128</a></li><li><a href="#impl-Roots-for-u16" title="u16">u16</a></li><li><a href="#impl-Roots-for-u32" title="u32">u32</a></li><li><a href="#impl-Roots-for-u64" title="u64">u64</a></li><li><a href="#impl-Roots-for-u8" title="u8">u8</a></li><li><a href="#impl-Roots-for-usize" title="usize">usize</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate num_<wbr>integer</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">num_integer</a></span><h1>Trait <span class="trait">Roots</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/num_integer/roots.rs.html#7-109">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Roots: <a class="trait" href="trait.Integer.html" title="trait num_integer::Integer">Integer</a> {
|
||
// Required method
|
||
fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self;
|
||
|
||
// Provided methods
|
||
fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self { ... }
|
||
<span class="item-spacer"></span> fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self { ... }
|
||
}</code></pre><details class="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="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.nth_root" class="method"><a class="src rightside" href="../src/num_integer/roots.rs.html#53">Source</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section></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"><a class="doc-anchor" href="#panics">§</a>Panics</h5>
|
||
<p>Panics if <code>n</code> is zero:</p>
|
||
|
||
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="macro">println!</span>(<span class="string">"can't compute ⁰√x : {}"</span>, <span class="number">123</span>.nth_root(<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="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="macro">println!</span>(<span class="string">"no imaginary numbers... {}"</span>, (-<span class="number">1</span>).nth_root(<span class="number">10</span>));</code></pre></div>
|
||
<h5 id="examples"><a class="doc-anchor" href="#examples">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>num_integer::Roots;
|
||
|
||
<span class="kw">let </span>x: i32 = <span class="number">12345</span>;
|
||
<span class="macro">assert_eq!</span>(x.nth_root(<span class="number">1</span>), x);
|
||
<span class="macro">assert_eq!</span>(x.nth_root(<span class="number">2</span>), x.sqrt());
|
||
<span class="macro">assert_eq!</span>(x.nth_root(<span class="number">3</span>), x.cbrt());
|
||
<span class="macro">assert_eq!</span>(x.nth_root(<span class="number">4</span>), <span class="number">10</span>);
|
||
<span class="macro">assert_eq!</span>(x.nth_root(<span class="number">13</span>), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(x.nth_root(<span class="number">14</span>), <span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(x.nth_root(std::u32::MAX), <span class="number">1</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(std::i32::MAX.nth_root(<span class="number">30</span>), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(std::i32::MAX.nth_root(<span class="number">31</span>), <span class="number">1</span>);
|
||
<span class="macro">assert_eq!</span>(std::i32::MIN.nth_root(<span class="number">31</span>), -<span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>((std::i32::MIN + <span class="number">1</span>).nth_root(<span class="number">31</span>), -<span class="number">1</span>);
|
||
|
||
<span class="macro">assert_eq!</span>(std::u32::MAX.nth_root(<span class="number">31</span>), <span class="number">2</span>);
|
||
<span class="macro">assert_eq!</span>(std::u32::MAX.nth_root(<span class="number">32</span>), <span class="number">1</span>);</code></pre></div>
|
||
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.sqrt" class="method"><a class="src rightside" href="../src/num_integer/roots.rs.html#80-82">Source</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section></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"><a class="doc-anchor" href="#panics-1">§</a>Panics</h5>
|
||
<p>Panics if <code>self</code> is less than zero:</p>
|
||
|
||
<div class="example-wrap should_panic"><a href="#" class="tooltip" title="This example panics">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="macro">println!</span>(<span class="string">"no imaginary numbers... {}"</span>, (-<span class="number">1</span>).sqrt());</code></pre></div>
|
||
<h5 id="examples-1"><a class="doc-anchor" href="#examples-1">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>num_integer::Roots;
|
||
|
||
<span class="kw">let </span>x: i32 = <span class="number">12345</span>;
|
||
<span class="macro">assert_eq!</span>((x * x).sqrt(), x);
|
||
<span class="macro">assert_eq!</span>((x * x + <span class="number">1</span>).sqrt(), x);
|
||
<span class="macro">assert_eq!</span>((x * x - <span class="number">1</span>).sqrt(), x - <span class="number">1</span>);</code></pre></div>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.cbrt" class="method"><a class="src rightside" href="../src/num_integer/roots.rs.html#106-108">Source</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></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"><a class="doc-anchor" href="#examples-2">§</a>Examples</h5>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>num_integer::Roots;
|
||
|
||
<span class="kw">let </span>x: i32 = <span class="number">1234</span>;
|
||
<span class="macro">assert_eq!</span>((x * x * x).cbrt(), x);
|
||
<span class="macro">assert_eq!</span>((x * x * x + <span class="number">1</span>).cbrt(), x);
|
||
<span class="macro">assert_eq!</span>((x * x * x - <span class="number">1</span>).cbrt(), x - <span class="number">1</span>);
|
||
|
||
<span class="macro">assert_eq!</span>((-(x * x * x)).cbrt(), -x);
|
||
<span class="macro">assert_eq!</span>((-(x * x * x + <span class="number">1</span>)).cbrt(), -x);
|
||
<span class="macro">assert_eq!</span>((-(x * x * x - <span class="number">1</span>)).cbrt(), -(x - <span class="number">1</span>));</code></pre></div>
|
||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.0/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-i8" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#163">Source</a><a href="#impl-Roots-for-i8" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.i8.html">i8</a></h3></section></summary><div class="impl-items"><section id="method.nth_root" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#163">Source</a><a href="#method.nth_root" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-1" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#163">Source</a><a href="#method.sqrt-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-1" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#163">Source</a><a href="#method.cbrt-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-i16" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#164">Source</a><a href="#impl-Roots-for-i16" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.i16.html">i16</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-1" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#164">Source</a><a href="#method.nth_root-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-2" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#164">Source</a><a href="#method.sqrt-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-2" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#164">Source</a><a href="#method.cbrt-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-i32" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#165">Source</a><a href="#impl-Roots-for-i32" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.i32.html">i32</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-2" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#165">Source</a><a href="#method.nth_root-2" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-3" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#165">Source</a><a href="#method.sqrt-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-3" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#165">Source</a><a href="#method.cbrt-3" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-i64" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#166">Source</a><a href="#impl-Roots-for-i64" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.i64.html">i64</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-3" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#166">Source</a><a href="#method.nth_root-3" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-4" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#166">Source</a><a href="#method.sqrt-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-4" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#166">Source</a><a href="#method.cbrt-4" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-i128" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#167">Source</a><a href="#impl-Roots-for-i128" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.i128.html">i128</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-4" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#167">Source</a><a href="#method.nth_root-4" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-5" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#167">Source</a><a href="#method.sqrt-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-5" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#167">Source</a><a href="#method.cbrt-5" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-isize" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#168">Source</a><a href="#impl-Roots-for-isize" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.isize.html">isize</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-5" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#168">Source</a><a href="#method.nth_root-5" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-6" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#168">Source</a><a href="#method.sqrt-6" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-6" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#168">Source</a><a href="#method.cbrt-6" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-u8" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#382">Source</a><a href="#impl-Roots-for-u8" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.u8.html">u8</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-6" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#382">Source</a><a href="#method.nth_root-6" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-7" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#382">Source</a><a href="#method.sqrt-7" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-7" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#382">Source</a><a href="#method.cbrt-7" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-u16" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#383">Source</a><a href="#impl-Roots-for-u16" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.u16.html">u16</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-7" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#383">Source</a><a href="#method.nth_root-7" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-8" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#383">Source</a><a href="#method.sqrt-8" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-8" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#383">Source</a><a href="#method.cbrt-8" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-u32" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#384">Source</a><a href="#impl-Roots-for-u32" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.u32.html">u32</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-8" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#384">Source</a><a href="#method.nth_root-8" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-9" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#384">Source</a><a href="#method.sqrt-9" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-9" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#384">Source</a><a href="#method.cbrt-9" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-u64" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#385">Source</a><a href="#impl-Roots-for-u64" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.u64.html">u64</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-9" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#385">Source</a><a href="#method.nth_root-9" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-10" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#385">Source</a><a href="#method.sqrt-10" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-10" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#385">Source</a><a href="#method.cbrt-10" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-u128" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#386">Source</a><a href="#impl-Roots-for-u128" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.u128.html">u128</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-10" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#386">Source</a><a href="#method.nth_root-10" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-11" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#386">Source</a><a href="#method.sqrt-11" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-11" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#386">Source</a><a href="#method.cbrt-11" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Roots-for-usize" class="impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#387">Source</a><a href="#impl-Roots-for-usize" class="anchor">§</a><h3 class="code-header">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.84.0/std/primitive.usize.html">usize</a></h3></section></summary><div class="impl-items"><section id="method.nth_root-11" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#387">Source</a><a href="#method.nth_root-11" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.nth_root" class="fn">nth_root</a>(&self, n: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>) -> Self</h4></section><section id="method.sqrt-12" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#387">Source</a><a href="#method.sqrt-12" class="anchor">§</a><h4 class="code-header">fn <a href="#method.sqrt" class="fn">sqrt</a>(&self) -> Self</h4></section><section id="method.cbrt-12" class="method trait-impl"><a class="src rightside" href="../src/num_integer/roots.rs.html#387">Source</a><a href="#method.cbrt-12" class="anchor">§</a><h4 class="code-header">fn <a href="#method.cbrt" class="fn">cbrt</a>(&self) -> Self</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../trait.impl/num_integer/roots/trait.Roots.js" data-ignore-extern-crates="std" async></script></section></div></main></body></html> |