Files
GopherGate/target/doc/libm/index.html
2026-02-26 12:00:21 -05:00

6 lines
19 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="libm in pure Rust"><title>libm - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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"href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="libm" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../static.files/storage-e2aeef58.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Crate libm</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../libm/index.html">libm</a><span class="version">0.2.16</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>libm</span>&nbsp;<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/libm/lib.rs.html#1-33">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>libm in pure Rust</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Libm.html" title="struct libm::Libm">Libm</a></dt><dd>Generic helper for libm functions, abstracting over f32 and f64. <br/></dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.acos.html" title="fn libm::acos">acos</a></dt><dd>Arccosine (f64)</dd><dt><a class="fn" href="fn.acosf.html" title="fn libm::acosf">acosf</a></dt><dd>Arccosine (f32)</dd><dt><a class="fn" href="fn.acosh.html" title="fn libm::acosh">acosh</a></dt><dd>Inverse hyperbolic cosine (f64)</dd><dt><a class="fn" href="fn.acoshf.html" title="fn libm::acoshf">acoshf</a></dt><dd>Inverse hyperbolic cosine (f32)</dd><dt><a class="fn" href="fn.asin.html" title="fn libm::asin">asin</a></dt><dd>Arcsine (f64)</dd><dt><a class="fn" href="fn.asinf.html" title="fn libm::asinf">asinf</a></dt><dd>Arcsine (f32)</dd><dt><a class="fn" href="fn.asinh.html" title="fn libm::asinh">asinh</a></dt><dd>Inverse hyperbolic sine (f64)</dd><dt><a class="fn" href="fn.asinhf.html" title="fn libm::asinhf">asinhf</a></dt><dd>Inverse hyperbolic sine (f32)</dd><dt><a class="fn" href="fn.atan.html" title="fn libm::atan">atan</a></dt><dd>Arctangent (f64)</dd><dt><a class="fn" href="fn.atan2.html" title="fn libm::atan2">atan2</a></dt><dd>Arctangent of y/x (f64)</dd><dt><a class="fn" href="fn.atan2f.html" title="fn libm::atan2f">atan2f</a></dt><dd>Arctangent of y/x (f32)</dd><dt><a class="fn" href="fn.atanf.html" title="fn libm::atanf">atanf</a></dt><dd>Arctangent (f32)</dd><dt><a class="fn" href="fn.atanh.html" title="fn libm::atanh">atanh</a></dt><dd>Inverse hyperbolic tangent (f64)</dd><dt><a class="fn" href="fn.atanhf.html" title="fn libm::atanhf">atanhf</a></dt><dd>Inverse hyperbolic tangent (f32)</dd><dt><a class="fn" href="fn.cbrt.html" title="fn libm::cbrt">cbrt</a></dt><dd>Compute the cube root of the argument.</dd><dt><a class="fn" href="fn.cbrtf.html" title="fn libm::cbrtf">cbrtf</a></dt><dd>Cube root (f32)</dd><dt><a class="fn" href="fn.ceil.html" title="fn libm::ceil">ceil</a></dt><dd>Ceil (f64)</dd><dt><a class="fn" href="fn.ceilf.html" title="fn libm::ceilf">ceilf</a></dt><dd>Ceil (f32)</dd><dt><a class="fn" href="fn.copysign.html" title="fn libm::copysign">copysign</a></dt><dd>Sign of Y, magnitude of X (f64)</dd><dt><a class="fn" href="fn.copysignf.html" title="fn libm::copysignf">copysignf</a></dt><dd>Sign of Y, magnitude of X (f32)</dd><dt><a class="fn" href="fn.cos.html" title="fn libm::cos">cos</a></dt><dd>The cosine of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.cosf.html" title="fn libm::cosf">cosf</a></dt><dd>The cosine of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.cosh.html" title="fn libm::cosh">cosh</a></dt><dd>Hyperbolic cosine (f64)</dd><dt><a class="fn" href="fn.coshf.html" title="fn libm::coshf">coshf</a></dt><dd>Hyperbolic cosine (f64)</dd><dt><a class="fn" href="fn.erf.html" title="fn libm::erf">erf</a></dt><dd>Error function (f64)</dd><dt><a class="fn" href="fn.erfc.html" title="fn libm::erfc">erfc</a></dt><dd>Complementary error function (f64)</dd><dt><a class="fn" href="fn.erfcf.html" title="fn libm::erfcf">erfcf</a></dt><dd>Complementary error function (f32)</dd><dt><a class="fn" href="fn.erff.html" title="fn libm::erff">erff</a></dt><dd>Error function (f32)</dd><dt><a class="fn" href="fn.exp.html" title="fn libm::exp">exp</a></dt><dd>Exponential, base <em>e</em> (f64)</dd><dt><a class="fn" href="fn.exp2.html" title="fn libm::exp2">exp2</a></dt><dd>Exponential, base 2 (f64)</dd><dt><a class="fn" href="fn.exp2f.html" title="fn libm::exp2f">exp2f</a></dt><dd>Exponential, base 2 (f32)</dd><dt><a class="fn" href="fn.exp10.html" title="fn libm::exp10">exp10</a></dt><dd>Calculates 10 raised to the power of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.exp10f.html" title="fn libm::exp10f">exp10f</a></dt><dd>Calculates 10 raised to the power of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.expf.html" title="fn libm::expf">expf</a></dt><dd>Exponential, base <em>e</em> (f32)</dd><dt><a class="fn" href="fn.expm1.html" title="fn libm::expm1">expm1</a></dt><dd>Exponential, base <em>e</em>, of x-1 (f64)</dd><dt><a class="fn" href="fn.expm1f.html" title="fn libm::expm1f">expm1f</a></dt><dd>Exponential, base <em>e</em>, of x-1 (f32)</dd><dt><a class="fn" href="fn.fabs.html" title="fn libm::fabs">fabs</a></dt><dd>Absolute value (magnitude) (f64)</dd><dt><a class="fn" href="fn.fabsf.html" title="fn libm::fabsf">fabsf</a></dt><dd>Absolute value (magnitude) (f32)</dd><dt><a class="fn" href="fn.fdim.html" title="fn libm::fdim">fdim</a></dt><dd>Positive difference (f64)</dd><dt><a class="fn" href="fn.fdimf.html" title="fn libm::fdimf">fdimf</a></dt><dd>Positive difference (f32)</dd><dt><a class="fn" href="fn.floor.html" title="fn libm::floor">floor</a></dt><dd>Floor (f64)</dd><dt><a class="fn" href="fn.floorf.html" title="fn libm::floorf">floorf</a></dt><dd>Floor (f32)</dd><dt><a class="fn" href="fn.fma.html" title="fn libm::fma">fma</a></dt><dd>Fused multiply add (f64)</dd><dt><a class="fn" href="fn.fmaf.html" title="fn libm::fmaf">fmaf</a></dt><dd>Floating multiply add (f32)</dd><dt><a class="fn" href="fn.fmax.html" title="fn libm::fmax">fmax</a></dt><dd>Return the greater of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fmaxf.html" title="fn libm::fmaxf">fmaxf</a></dt><dd>Return the greater of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fmaximum.html" title="fn libm::fmaximum">fmaximum</a></dt><dd>Return the greater of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fmaximum_num.html" title="fn libm::fmaximum_num">fmaximum_<wbr>num</a></dt><dd>Return the greater of two arguments or, if either argument is NaN, NaN.</dd><dt><a class="fn" href="fn.fmaximum_numf.html" title="fn libm::fmaximum_numf">fmaximum_<wbr>numf</a></dt><dd>Return the greater of two arguments or, if either argument is NaN, NaN.</dd><dt><a class="fn" href="fn.fmaximumf.html" title="fn libm::fmaximumf">fmaximumf</a></dt><dd>Return the greater of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fmin.html" title="fn libm::fmin">fmin</a></dt><dd>Return the lesser of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fminf.html" title="fn libm::fminf">fminf</a></dt><dd>Return the lesser of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fminimum.html" title="fn libm::fminimum">fminimum</a></dt><dd>Return the lesser of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fminimum_num.html" title="fn libm::fminimum_num">fminimum_<wbr>num</a></dt><dd>Return the lesser of two arguments or, if either argument is NaN, NaN.</dd><dt><a class="fn" href="fn.fminimum_numf.html" title="fn libm::fminimum_numf">fminimum_<wbr>numf</a></dt><dd>Return the lesser of two arguments or, if either argument is NaN, NaN.</dd><dt><a class="fn" href="fn.fminimumf.html" title="fn libm::fminimumf">fminimumf</a></dt><dd>Return the lesser of two arguments or, if either argument is NaN, the other argument.</dd><dt><a class="fn" href="fn.fmod.html" title="fn libm::fmod">fmod</a></dt><dd>Calculate the remainder of <code>x / y</code>, the precise result of <code>x - trunc(x / y) * y</code>.</dd><dt><a class="fn" href="fn.fmodf.html" title="fn libm::fmodf">fmodf</a></dt><dd>Calculate the remainder of <code>x / y</code>, the precise result of <code>x - trunc(x / y) * y</code>.</dd><dt><a class="fn" href="fn.frexp.html" title="fn libm::frexp">frexp</a></dt><dt><a class="fn" href="fn.frexpf.html" title="fn libm::frexpf">frexpf</a></dt><dt><a class="fn" href="fn.hypot.html" title="fn libm::hypot">hypot</a></dt><dt><a class="fn" href="fn.hypotf.html" title="fn libm::hypotf">hypotf</a></dt><dt><a class="fn" href="fn.ilogb.html" title="fn libm::ilogb">ilogb</a></dt><dt><a class="fn" href="fn.ilogbf.html" title="fn libm::ilogbf">ilogbf</a></dt><dt><a class="fn" href="fn.j0.html" title="fn libm::j0">j0</a></dt><dd>Zeroth order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the first kind (f64).</dd><dt><a class="fn" href="fn.j0f.html" title="fn libm::j0f">j0f</a></dt><dd>Zeroth order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the first kind (f32).</dd><dt><a class="fn" href="fn.j1.html" title="fn libm::j1">j1</a></dt><dd>First order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the first kind (f64).</dd><dt><a class="fn" href="fn.j1f.html" title="fn libm::j1f">j1f</a></dt><dd>First order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the first kind (f32).</dd><dt><a class="fn" href="fn.jn.html" title="fn libm::jn">jn</a></dt><dd>Integer order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the first kind (f64).</dd><dt><a class="fn" href="fn.jnf.html" title="fn libm::jnf">jnf</a></dt><dd>Integer order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the first kind (f32).</dd><dt><a class="fn" href="fn.ldexp.html" title="fn libm::ldexp">ldexp</a></dt><dt><a class="fn" href="fn.ldexpf.html" title="fn libm::ldexpf">ldexpf</a></dt><dt><a class="fn" href="fn.lgamma.html" title="fn libm::lgamma">lgamma</a></dt><dd>The natural logarithm of the
<a href="https://en.wikipedia.org/wiki/Gamma_function">Gamma function</a> (f64).</dd><dt><a class="fn" href="fn.lgamma_r.html" title="fn libm::lgamma_r">lgamma_<wbr>r</a></dt><dt><a class="fn" href="fn.lgammaf.html" title="fn libm::lgammaf">lgammaf</a></dt><dd>The natural logarithm of the
<a href="https://en.wikipedia.org/wiki/Gamma_function">Gamma function</a> (f32).</dd><dt><a class="fn" href="fn.lgammaf_r.html" title="fn libm::lgammaf_r">lgammaf_<wbr>r</a></dt><dt><a class="fn" href="fn.log.html" title="fn libm::log">log</a></dt><dd>The natural logarithm of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.log2.html" title="fn libm::log2">log2</a></dt><dd>The base 2 logarithm of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.log1p.html" title="fn libm::log1p">log1p</a></dt><dd>The natural logarithm of 1+<code>x</code> (f64).</dd><dt><a class="fn" href="fn.log1pf.html" title="fn libm::log1pf">log1pf</a></dt><dd>The natural logarithm of 1+<code>x</code> (f32).</dd><dt><a class="fn" href="fn.log2f.html" title="fn libm::log2f">log2f</a></dt><dd>The base 2 logarithm of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.log10.html" title="fn libm::log10">log10</a></dt><dd>The base 10 logarithm of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.log10f.html" title="fn libm::log10f">log10f</a></dt><dd>The base 10 logarithm of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.logf.html" title="fn libm::logf">logf</a></dt><dd>The natural logarithm of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.modf.html" title="fn libm::modf">modf</a></dt><dt><a class="fn" href="fn.modff.html" title="fn libm::modff">modff</a></dt><dt><a class="fn" href="fn.nextafter.html" title="fn libm::nextafter">nextafter</a></dt><dt><a class="fn" href="fn.nextafterf.html" title="fn libm::nextafterf">nextafterf</a></dt><dt><a class="fn" href="fn.pow.html" title="fn libm::pow">pow</a></dt><dd>Returns <code>x</code> to the power of <code>y</code> (f64).</dd><dt><a class="fn" href="fn.powf.html" title="fn libm::powf">powf</a></dt><dd>Returns <code>x</code> to the power of <code>y</code> (f32).</dd><dt><a class="fn" href="fn.remainder.html" title="fn libm::remainder">remainder</a></dt><dt><a class="fn" href="fn.remainderf.html" title="fn libm::remainderf">remainderf</a></dt><dt><a class="fn" href="fn.remquo.html" title="fn libm::remquo">remquo</a></dt><dt><a class="fn" href="fn.remquof.html" title="fn libm::remquof">remquof</a></dt><dt><a class="fn" href="fn.rint.html" title="fn libm::rint">rint</a></dt><dd>Round <code>x</code> to the nearest integer, breaking ties toward even.</dd><dt><a class="fn" href="fn.rintf.html" title="fn libm::rintf">rintf</a></dt><dd>Round <code>x</code> to the nearest integer, breaking ties toward even.</dd><dt><a class="fn" href="fn.round.html" title="fn libm::round">round</a></dt><dd>Round <code>x</code> to the nearest integer, breaking ties away from zero.</dd><dt><a class="fn" href="fn.roundeven.html" title="fn libm::roundeven">roundeven</a></dt><dd>Round <code>x</code> to the nearest integer, breaking ties toward even. This is IEEE 754
<code>roundToIntegralTiesToEven</code>.</dd><dt><a class="fn" href="fn.roundevenf.html" title="fn libm::roundevenf">roundevenf</a></dt><dd>Round <code>x</code> to the nearest integer, breaking ties toward even. This is IEEE 754
<code>roundToIntegralTiesToEven</code>.</dd><dt><a class="fn" href="fn.roundf.html" title="fn libm::roundf">roundf</a></dt><dd>Round <code>x</code> to the nearest integer, breaking ties away from zero.</dd><dt><a class="fn" href="fn.scalbn.html" title="fn libm::scalbn">scalbn</a></dt><dt><a class="fn" href="fn.scalbnf.html" title="fn libm::scalbnf">scalbnf</a></dt><dt><a class="fn" href="fn.sin.html" title="fn libm::sin">sin</a></dt><dd>The sine of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.sincos.html" title="fn libm::sincos">sincos</a></dt><dd>Both the sine and cosine of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.sincosf.html" title="fn libm::sincosf">sincosf</a></dt><dd>Both the sine and cosine of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.sinf.html" title="fn libm::sinf">sinf</a></dt><dd>The sine of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.sinh.html" title="fn libm::sinh">sinh</a></dt><dd>The hyperbolic sine of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.sinhf.html" title="fn libm::sinhf">sinhf</a></dt><dd>The hyperbolic sine of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.sqrt.html" title="fn libm::sqrt">sqrt</a></dt><dd>The square root of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.sqrtf.html" title="fn libm::sqrtf">sqrtf</a></dt><dd>The square root of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.tan.html" title="fn libm::tan">tan</a></dt><dd>The tangent of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.tanf.html" title="fn libm::tanf">tanf</a></dt><dd>The tangent of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.tanh.html" title="fn libm::tanh">tanh</a></dt><dd>The hyperbolic tangent of <code>x</code> (f64).</dd><dt><a class="fn" href="fn.tanhf.html" title="fn libm::tanhf">tanhf</a></dt><dd>The hyperbolic tangent of <code>x</code> (f32).</dd><dt><a class="fn" href="fn.tgamma.html" title="fn libm::tgamma">tgamma</a></dt><dd>The <a href="https://en.wikipedia.org/wiki/Gamma_function">Gamma function</a> (f64).</dd><dt><a class="fn" href="fn.tgammaf.html" title="fn libm::tgammaf">tgammaf</a></dt><dd>The <a href="https://en.wikipedia.org/wiki/Gamma_function">Gamma function</a> (f32).</dd><dt><a class="fn" href="fn.trunc.html" title="fn libm::trunc">trunc</a></dt><dd>Rounds the number toward 0 to the closest integral value (f64).</dd><dt><a class="fn" href="fn.truncf.html" title="fn libm::truncf">truncf</a></dt><dd>Rounds the number toward 0 to the closest integral value (f32).</dd><dt><a class="fn" href="fn.y0.html" title="fn libm::y0">y0</a></dt><dd>Zeroth order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the second kind (f64).</dd><dt><a class="fn" href="fn.y0f.html" title="fn libm::y0f">y0f</a></dt><dd>Zeroth order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the second kind (f32).</dd><dt><a class="fn" href="fn.y1.html" title="fn libm::y1">y1</a></dt><dd>First order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the second kind (f64).</dd><dt><a class="fn" href="fn.y1f.html" title="fn libm::y1f">y1f</a></dt><dd>First order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the second kind (f32).</dd><dt><a class="fn" href="fn.yn.html" title="fn libm::yn">yn</a></dt><dd>Integer order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the second kind (f64).</dd><dt><a class="fn" href="fn.ynf.html" title="fn libm::ynf">ynf</a></dt><dd>Integer order of the <a href="https://en.wikipedia.org/wiki/Bessel_function">Bessel function</a> of the second kind (f32).</dd></dl></section></div></main></body></html>