95 lines
32 KiB
HTML
95 lines
32 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="Generic trait for floating point complex numbers."><title>ComplexFloat in num_complex - 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_complex" 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_complex/index.html">num_<wbr>complex</a><span class="version">0.4.6</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Complex<wbr>Float</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.Real" title="Real">Real</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.abs" title="abs">abs</a></li><li><a href="#tymethod.acos" title="acos">acos</a></li><li><a href="#tymethod.acosh" title="acosh">acosh</a></li><li><a href="#tymethod.arg" title="arg">arg</a></li><li><a href="#tymethod.asin" title="asin">asin</a></li><li><a href="#tymethod.asinh" title="asinh">asinh</a></li><li><a href="#tymethod.atan" title="atan">atan</a></li><li><a href="#tymethod.atanh" title="atanh">atanh</a></li><li><a href="#tymethod.cbrt" title="cbrt">cbrt</a></li><li><a href="#tymethod.conj" title="conj">conj</a></li><li><a href="#tymethod.cos" title="cos">cos</a></li><li><a href="#tymethod.cosh" title="cosh">cosh</a></li><li><a href="#tymethod.exp" title="exp">exp</a></li><li><a href="#tymethod.exp2" title="exp2">exp2</a></li><li><a href="#tymethod.expf" title="expf">expf</a></li><li><a href="#tymethod.im" title="im">im</a></li><li><a href="#tymethod.is_finite" title="is_finite">is_finite</a></li><li><a href="#tymethod.is_infinite" title="is_infinite">is_infinite</a></li><li><a href="#tymethod.is_nan" title="is_nan">is_nan</a></li><li><a href="#tymethod.is_normal" title="is_normal">is_normal</a></li><li><a href="#tymethod.l1_norm" title="l1_norm">l1_norm</a></li><li><a href="#tymethod.ln" title="ln">ln</a></li><li><a href="#tymethod.log" title="log">log</a></li><li><a href="#tymethod.log10" title="log10">log10</a></li><li><a href="#tymethod.log2" title="log2">log2</a></li><li><a href="#tymethod.powc" title="powc">powc</a></li><li><a href="#tymethod.powf" title="powf">powf</a></li><li><a href="#tymethod.powi" title="powi">powi</a></li><li><a href="#tymethod.re" title="re">re</a></li><li><a href="#tymethod.recip" title="recip">recip</a></li><li><a href="#tymethod.sin" title="sin">sin</a></li><li><a href="#tymethod.sinh" title="sinh">sinh</a></li><li><a href="#tymethod.sqrt" title="sqrt">sqrt</a></li><li><a href="#tymethod.tan" title="tan">tan</a></li><li><a href="#tymethod.tanh" title="tanh">tanh</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>complex</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_complex</a></span><h1>Trait <span class="trait">ComplexFloat</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_complex/complex_float.rs.html#28-147">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ComplexFloat:
|
||
<a class="trait" href="../num_traits/trait.Num.html" title="trait num_traits::Num">Num</a>
|
||
+ <a class="trait" href="../num_traits/cast/trait.NumCast.html" title="trait num_traits::cast::NumCast">NumCast</a>
|
||
+ <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Copy.html" title="trait core::marker::Copy">Copy</a>
|
||
+ <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/ops/arith/trait.Neg.html" title="trait core::ops::arith::Neg">Neg</a><Output = Self>
|
||
+ Seal {
|
||
type <a href="#associatedtype.Real" class="associatedtype">Real</a>: <a class="trait" href="../num_traits/float/trait.Float.html" title="trait num_traits::float::Float">Float</a> + <a class="trait" href="../num_traits/float/trait.FloatConst.html" title="trait num_traits::float::FloatConst">FloatConst</a>;
|
||
|
||
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 35 methods</span></summary> // Required methods
|
||
fn <a href="#tymethod.is_nan" class="fn">is_nan</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.is_infinite" class="fn">is_infinite</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.is_finite" class="fn">is_finite</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.is_normal" class="fn">is_normal</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.recip" class="fn">recip</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.powi" class="fn">powi</a>(self, exp: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i32.html">i32</a>) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.powf" class="fn">powf</a>(self, exp: Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.powc" class="fn">powc</a>(self, exp: <a class="struct" href="struct.Complex.html" title="struct num_complex::Complex">Complex</a><Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>>) -> <a class="struct" href="struct.Complex.html" title="struct num_complex::Complex">Complex</a><Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.sqrt" class="fn">sqrt</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.exp" class="fn">exp</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.exp2" class="fn">exp2</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.expf" class="fn">expf</a>(self, base: Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.ln" class="fn">ln</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.log" class="fn">log</a>(self, base: Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.log2" class="fn">log2</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.log10" class="fn">log10</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.cbrt" class="fn">cbrt</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.sin" class="fn">sin</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.cos" class="fn">cos</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.tan" class="fn">tan</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.asin" class="fn">asin</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.acos" class="fn">acos</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.atan" class="fn">atan</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.sinh" class="fn">sinh</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.cosh" class="fn">cosh</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.tanh" class="fn">tanh</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.asinh" class="fn">asinh</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.acosh" class="fn">acosh</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.atanh" class="fn">atanh</a>(self) -> Self;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.re" class="fn">re</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.im" class="fn">im</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.abs" class="fn">abs</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.l1_norm" class="fn">l1_norm</a>(&self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.arg" class="fn">arg</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>;
|
||
<span class="item-spacer"></span> fn <a href="#tymethod.conj" class="fn">conj</a>(self) -> Self;
|
||
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Generic trait for floating point complex numbers.</p>
|
||
<p>This trait defines methods which are common to complex floating point
|
||
numbers and regular floating point numbers.</p>
|
||
<p>This trait is sealed to prevent it from being implemented by anything other
|
||
than floating point scalars and <a href="struct.Complex.html" title="struct num_complex::Complex">Complex</a> floats.</p>
|
||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><details class="toggle" open><summary><section id="associatedtype.Real" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#30">Source</a><h4 class="code-header">type <a href="#associatedtype.Real" class="associatedtype">Real</a>: <a class="trait" href="../num_traits/float/trait.Float.html" title="trait num_traits::float::Float">Float</a> + <a class="trait" href="../num_traits/float/trait.FloatConst.html" title="trait num_traits::float::FloatConst">FloatConst</a></h4></section></summary><div class="docblock"><p>The type used to represent the real coefficients of this complex number.</p>
|
||
</div></details></div><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.is_nan" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#33">Source</a><h4 class="code-header">fn <a href="#tymethod.is_nan" class="fn">is_nan</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if this value is <code>NaN</code> and false otherwise.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.is_infinite" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#37">Source</a><h4 class="code-header">fn <a href="#tymethod.is_infinite" class="fn">is_infinite</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if this value is positive infinity or negative infinity and
|
||
false otherwise.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.is_finite" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#40">Source</a><h4 class="code-header">fn <a href="#tymethod.is_finite" class="fn">is_finite</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if this number is neither infinite nor <code>NaN</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.is_normal" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#44">Source</a><h4 class="code-header">fn <a href="#tymethod.is_normal" class="fn">is_normal</a>(self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Returns <code>true</code> if the number is neither zero, infinite,
|
||
<a href="http://en.wikipedia.org/wiki/Denormal_number">subnormal</a>, or <code>NaN</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.recip" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#47">Source</a><h4 class="code-header">fn <a href="#tymethod.recip" class="fn">recip</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Take the reciprocal (inverse) of a number, <code>1/x</code>. See also <a href="struct.Complex.html#method.finv" title="method num_complex::Complex::finv">Complex::finv</a>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.powi" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#50">Source</a><h4 class="code-header">fn <a href="#tymethod.powi" class="fn">powi</a>(self, exp: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i32.html">i32</a>) -> Self</h4></section></summary><div class="docblock"><p>Raises <code>self</code> to a signed integer power.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.powf" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#53">Source</a><h4 class="code-header">fn <a href="#tymethod.powf" class="fn">powf</a>(self, exp: Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>) -> Self</h4></section></summary><div class="docblock"><p>Raises <code>self</code> to a real power.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.powc" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#56">Source</a><h4 class="code-header">fn <a href="#tymethod.powc" class="fn">powc</a>(self, exp: <a class="struct" href="struct.Complex.html" title="struct num_complex::Complex">Complex</a><Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>>) -> <a class="struct" href="struct.Complex.html" title="struct num_complex::Complex">Complex</a><Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>></h4></section></summary><div class="docblock"><p>Raises <code>self</code> to a complex power.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.sqrt" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#59">Source</a><h4 class="code-header">fn <a href="#tymethod.sqrt" class="fn">sqrt</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Take the square root of a number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.exp" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#62">Source</a><h4 class="code-header">fn <a href="#tymethod.exp" class="fn">exp</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Returns <code>e^(self)</code>, (the exponential function).</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.exp2" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#65">Source</a><h4 class="code-header">fn <a href="#tymethod.exp2" class="fn">exp2</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Returns <code>2^(self)</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.expf" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#68">Source</a><h4 class="code-header">fn <a href="#tymethod.expf" class="fn">expf</a>(self, base: Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>) -> Self</h4></section></summary><div class="docblock"><p>Returns <code>base^(self)</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.ln" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#71">Source</a><h4 class="code-header">fn <a href="#tymethod.ln" class="fn">ln</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Returns the natural logarithm of the number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.log" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#74">Source</a><h4 class="code-header">fn <a href="#tymethod.log" class="fn">log</a>(self, base: Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a>) -> Self</h4></section></summary><div class="docblock"><p>Returns the logarithm of the number with respect to an arbitrary base.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.log2" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#77">Source</a><h4 class="code-header">fn <a href="#tymethod.log2" class="fn">log2</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Returns the base 2 logarithm of the number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.log10" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#80">Source</a><h4 class="code-header">fn <a href="#tymethod.log10" class="fn">log10</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Returns the base 10 logarithm of the number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.cbrt" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#83">Source</a><h4 class="code-header">fn <a href="#tymethod.cbrt" class="fn">cbrt</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Take the cubic root of a number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.sin" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#86">Source</a><h4 class="code-header">fn <a href="#tymethod.sin" class="fn">sin</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the sine of a number (in radians).</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.cos" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#89">Source</a><h4 class="code-header">fn <a href="#tymethod.cos" class="fn">cos</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the cosine of a number (in radians).</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.tan" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#92">Source</a><h4 class="code-header">fn <a href="#tymethod.tan" class="fn">tan</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the tangent of a number (in radians).</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.asin" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#97">Source</a><h4 class="code-header">fn <a href="#tymethod.asin" class="fn">asin</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the arcsine of a number. Return value is in radians in
|
||
the range [-pi/2, pi/2] or NaN if the number is outside the range
|
||
[-1, 1].</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.acos" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#102">Source</a><h4 class="code-header">fn <a href="#tymethod.acos" class="fn">acos</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the arccosine of a number. Return value is in radians in
|
||
the range [0, pi] or NaN if the number is outside the range
|
||
[-1, 1].</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.atan" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#106">Source</a><h4 class="code-header">fn <a href="#tymethod.atan" class="fn">atan</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the arctangent of a number. Return value is in radians in the
|
||
range [-pi/2, pi/2];</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.sinh" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#109">Source</a><h4 class="code-header">fn <a href="#tymethod.sinh" class="fn">sinh</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Hyperbolic sine function.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.cosh" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#112">Source</a><h4 class="code-header">fn <a href="#tymethod.cosh" class="fn">cosh</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Hyperbolic cosine function.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.tanh" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#115">Source</a><h4 class="code-header">fn <a href="#tymethod.tanh" class="fn">tanh</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Hyperbolic tangent function.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.asinh" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#118">Source</a><h4 class="code-header">fn <a href="#tymethod.asinh" class="fn">asinh</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Inverse hyperbolic sine function.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.acosh" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#121">Source</a><h4 class="code-header">fn <a href="#tymethod.acosh" class="fn">acosh</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Inverse hyperbolic cosine function.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.atanh" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#124">Source</a><h4 class="code-header">fn <a href="#tymethod.atanh" class="fn">atanh</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Inverse hyperbolic tangent function.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.re" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#127">Source</a><h4 class="code-header">fn <a href="#tymethod.re" class="fn">re</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a></h4></section></summary><div class="docblock"><p>Returns the real part of the number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.im" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#130">Source</a><h4 class="code-header">fn <a href="#tymethod.im" class="fn">im</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a></h4></section></summary><div class="docblock"><p>Returns the imaginary part of the number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.abs" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#133">Source</a><h4 class="code-header">fn <a href="#tymethod.abs" class="fn">abs</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a></h4></section></summary><div class="docblock"><p>Returns the absolute value of the number. See also <a href="struct.Complex.html#method.norm" title="method num_complex::Complex::norm">Complex::norm</a></p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.l1_norm" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#138">Source</a><h4 class="code-header">fn <a href="#tymethod.l1_norm" class="fn">l1_norm</a>(&self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a></h4></section></summary><div class="docblock"><p>Returns the L1 norm <code>|re| + |im|</code> – the <a href="https://en.wikipedia.org/wiki/Taxicab_geometry">Manhattan distance</a> from the origin.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.arg" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#141">Source</a><h4 class="code-header">fn <a href="#tymethod.arg" class="fn">arg</a>(self) -> Self::<a class="associatedtype" href="trait.ComplexFloat.html#associatedtype.Real" title="type num_complex::ComplexFloat::Real">Real</a></h4></section></summary><div class="docblock"><p>Computes the argument of the number.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.conj" class="method"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#146">Source</a><h4 class="code-header">fn <a href="#tymethod.conj" class="fn">conj</a>(self) -> Self</h4></section></summary><div class="docblock"><p>Computes the complex conjugate of the number.</p>
|
||
<p>Formula: <code>a+bi -> a-bi</code></p>
|
||
</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="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-ComplexFloat-for-T" class="impl"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#169-239">Source</a><a href="#impl-ComplexFloat-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="trait.ComplexFloat.html" title="trait num_complex::ComplexFloat">ComplexFloat</a> for T<div class="where">where
|
||
T: <a class="trait" href="../num_traits/float/trait.Float.html" title="trait num_traits::float::Float">Float</a> + <a class="trait" href="../num_traits/float/trait.FloatConst.html" title="trait num_traits::float::FloatConst">FloatConst</a>,</div></h3></section></summary><div class="impl-items"><section id="associatedtype.Real-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#173">Source</a><a href="#associatedtype.Real-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Real" class="associatedtype">Real</a> = T</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ComplexFloat-for-Complex%3CT%3E" class="impl"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#241-315">Source</a><a href="#impl-ComplexFloat-for-Complex%3CT%3E" class="anchor">§</a><h3 class="code-header">impl<T: <a class="trait" href="../num_traits/float/trait.Float.html" title="trait num_traits::float::Float">Float</a> + <a class="trait" href="../num_traits/float/trait.FloatConst.html" title="trait num_traits::float::FloatConst">FloatConst</a>> <a class="trait" href="trait.ComplexFloat.html" title="trait num_complex::ComplexFloat">ComplexFloat</a> for <a class="struct" href="struct.Complex.html" title="struct num_complex::Complex">Complex</a><T></h3></section></summary><div class="impl-items"><section id="associatedtype.Real-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/num_complex/complex_float.rs.html#242">Source</a><a href="#associatedtype.Real-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.Real" class="associatedtype">Real</a> = T</h4></section></div></details></div><script src="../trait.impl/num_complex/complex_float/trait.ComplexFloat.js" async></script></section></div></main></body></html> |