You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1753 lines
45 KiB

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#375EAB">
<title>math - The Go Programming Language</title>
<link type="text/css" rel="stylesheet" href="../../lib/godoc/style.css">
<link rel="stylesheet" href="../../lib/godoc/jquery.treeview.css">
<script type="text/javascript">window.initFuncs = [];</script>
</head>
<body>
<div id='lowframe' style="position: fixed; bottom: 0; left: 0; height: 0; width: 100%; border-top: thin solid grey; background-color: white; overflow: auto;">
...
</div><!-- #lowframe -->
<div id="topbar" class="wide"><div class="container">
<div class="top-heading" id="heading-wide"><a href="http://localhost:6060/">The Go Programming Language</a></div>
<div class="top-heading" id="heading-narrow"><a href="http://localhost:6060/">Go</a></div>
<a href="index.html#" id="menu-button"><span id="menu-button-arrow">&#9661;</span></a>
<form method="GET" action="http://localhost:6060/search">
<div id="menu">
<a href="http://localhost:6060/doc/">Documents</a>
<a href="http://localhost:6060/pkg/">Packages</a>
<a href="http://localhost:6060/project/">The Project</a>
<a href="http://localhost:6060/help/">Help</a>
<a href="http://localhost:6060/blog/">Blog</a>
<input type="text" id="search" name="q" class="inactive" value="Search" placeholder="Search">
</div>
</form>
</div></div>
<div id="page" class="wide">
<div class="container">
<h1>Package math</h1>
<div id="nav"></div>
<!--
Copyright 2009 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
Note: Static (i.e., not template-generated) href and id
attributes start with "pkg-" to make it impossible for
them to conflict with generated attributes (some of which
correspond to Go identifiers).
-->
<script type='text/javascript'>
document.ANALYSIS_DATA = null;
document.CALLGRAPH = null;
</script>
<div id="short-nav">
<dl>
<dd><code>import "math"</code></dd>
</dl>
<dl>
<dd><a href="index.html#pkg-overview" class="overviewLink">Overview</a></dd>
<dd><a href="index.html#pkg-index" class="indexLink">Index</a></dd>
<dd><a href="index.html#pkg-subdirectories">Subdirectories</a></dd>
</dl>
</div>
<!-- The package's Name is printed as title by the top-level template -->
<div id="pkg-overview" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
<p>
Package math provides basic constants and mathematical functions.
</p>
</div>
</div>
<div id="pkg-index" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Index ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Index ▾</h2>
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. -->
<div id="manual-nav">
<dl>
<dd><a href="index.html#pkg-constants">Constants</a></dd>
<dd><a href="index.html#Abs">func Abs(x float64) float64</a></dd>
<dd><a href="index.html#Acos">func Acos(x float64) float64</a></dd>
<dd><a href="index.html#Acosh">func Acosh(x float64) float64</a></dd>
<dd><a href="index.html#Asin">func Asin(x float64) float64</a></dd>
<dd><a href="index.html#Asinh">func Asinh(x float64) float64</a></dd>
<dd><a href="index.html#Atan">func Atan(x float64) float64</a></dd>
<dd><a href="index.html#Atan2">func Atan2(y, x float64) float64</a></dd>
<dd><a href="index.html#Atanh">func Atanh(x float64) float64</a></dd>
<dd><a href="index.html#Cbrt">func Cbrt(x float64) float64</a></dd>
<dd><a href="index.html#Ceil">func Ceil(x float64) float64</a></dd>
<dd><a href="index.html#Copysign">func Copysign(x, y float64) float64</a></dd>
<dd><a href="index.html#Cos">func Cos(x float64) float64</a></dd>
<dd><a href="index.html#Cosh">func Cosh(x float64) float64</a></dd>
<dd><a href="index.html#Dim">func Dim(x, y float64) float64</a></dd>
<dd><a href="index.html#Erf">func Erf(x float64) float64</a></dd>
<dd><a href="index.html#Erfc">func Erfc(x float64) float64</a></dd>
<dd><a href="index.html#Exp">func Exp(x float64) float64</a></dd>
<dd><a href="index.html#Exp2">func Exp2(x float64) float64</a></dd>
<dd><a href="index.html#Expm1">func Expm1(x float64) float64</a></dd>
<dd><a href="index.html#Float32bits">func Float32bits(f float32) uint32</a></dd>
<dd><a href="index.html#Float32frombits">func Float32frombits(b uint32) float32</a></dd>
<dd><a href="index.html#Float64bits">func Float64bits(f float64) uint64</a></dd>
<dd><a href="index.html#Float64frombits">func Float64frombits(b uint64) float64</a></dd>
<dd><a href="index.html#Floor">func Floor(x float64) float64</a></dd>
<dd><a href="index.html#Frexp">func Frexp(f float64) (frac float64, exp int)</a></dd>
<dd><a href="index.html#Gamma">func Gamma(x float64) float64</a></dd>
<dd><a href="index.html#Hypot">func Hypot(p, q float64) float64</a></dd>
<dd><a href="index.html#Ilogb">func Ilogb(x float64) int</a></dd>
<dd><a href="index.html#Inf">func Inf(sign int) float64</a></dd>
<dd><a href="index.html#IsInf">func IsInf(f float64, sign int) bool</a></dd>
<dd><a href="index.html#IsNaN">func IsNaN(f float64) (is bool)</a></dd>
<dd><a href="index.html#J0">func J0(x float64) float64</a></dd>
<dd><a href="index.html#J1">func J1(x float64) float64</a></dd>
<dd><a href="index.html#Jn">func Jn(n int, x float64) float64</a></dd>
<dd><a href="index.html#Ldexp">func Ldexp(frac float64, exp int) float64</a></dd>
<dd><a href="index.html#Lgamma">func Lgamma(x float64) (lgamma float64, sign int)</a></dd>
<dd><a href="index.html#Log">func Log(x float64) float64</a></dd>
<dd><a href="index.html#Log10">func Log10(x float64) float64</a></dd>
<dd><a href="index.html#Log1p">func Log1p(x float64) float64</a></dd>
<dd><a href="index.html#Log2">func Log2(x float64) float64</a></dd>
<dd><a href="index.html#Logb">func Logb(x float64) float64</a></dd>
<dd><a href="index.html#Max">func Max(x, y float64) float64</a></dd>
<dd><a href="index.html#Min">func Min(x, y float64) float64</a></dd>
<dd><a href="index.html#Mod">func Mod(x, y float64) float64</a></dd>
<dd><a href="index.html#Modf">func Modf(f float64) (int float64, frac float64)</a></dd>
<dd><a href="index.html#NaN">func NaN() float64</a></dd>
<dd><a href="index.html#Nextafter">func Nextafter(x, y float64) (r float64)</a></dd>
<dd><a href="index.html#Nextafter32">func Nextafter32(x, y float32) (r float32)</a></dd>
<dd><a href="index.html#Pow">func Pow(x, y float64) float64</a></dd>
<dd><a href="index.html#Pow10">func Pow10(e int) float64</a></dd>
<dd><a href="index.html#Remainder">func Remainder(x, y float64) float64</a></dd>
<dd><a href="index.html#Signbit">func Signbit(x float64) bool</a></dd>
<dd><a href="index.html#Sin">func Sin(x float64) float64</a></dd>
<dd><a href="index.html#Sincos">func Sincos(x float64) (sin, cos float64)</a></dd>
<dd><a href="index.html#Sinh">func Sinh(x float64) float64</a></dd>
<dd><a href="index.html#Sqrt">func Sqrt(x float64) float64</a></dd>
<dd><a href="index.html#Tan">func Tan(x float64) float64</a></dd>
<dd><a href="index.html#Tanh">func Tanh(x float64) float64</a></dd>
<dd><a href="index.html#Trunc">func Trunc(x float64) float64</a></dd>
<dd><a href="index.html#Y0">func Y0(x float64) float64</a></dd>
<dd><a href="index.html#Y1">func Y1(x float64) float64</a></dd>
<dd><a href="index.html#Yn">func Yn(n int, x float64) float64</a></dd>
</dl>
</div><!-- #manual-nav -->
<h4>Package files</h4>
<p>
<span style="font-size:90%">
<a href="http://localhost:6060/src/math/abs.go">abs.go</a>
<a href="http://localhost:6060/src/math/acosh.go">acosh.go</a>
<a href="http://localhost:6060/src/math/asin.go">asin.go</a>
<a href="http://localhost:6060/src/math/asinh.go">asinh.go</a>
<a href="http://localhost:6060/src/math/atan.go">atan.go</a>
<a href="http://localhost:6060/src/math/atan2.go">atan2.go</a>
<a href="http://localhost:6060/src/math/atanh.go">atanh.go</a>
<a href="http://localhost:6060/src/math/bits.go">bits.go</a>
<a href="http://localhost:6060/src/math/cbrt.go">cbrt.go</a>
<a href="http://localhost:6060/src/math/const.go">const.go</a>
<a href="http://localhost:6060/src/math/copysign.go">copysign.go</a>
<a href="http://localhost:6060/src/math/dim.go">dim.go</a>
<a href="http://localhost:6060/src/math/erf.go">erf.go</a>
<a href="http://localhost:6060/src/math/exp.go">exp.go</a>
<a href="http://localhost:6060/src/math/expm1.go">expm1.go</a>
<a href="http://localhost:6060/src/math/floor.go">floor.go</a>
<a href="http://localhost:6060/src/math/floor_asm.go">floor_asm.go</a>
<a href="http://localhost:6060/src/math/frexp.go">frexp.go</a>
<a href="http://localhost:6060/src/math/gamma.go">gamma.go</a>
<a href="http://localhost:6060/src/math/hypot.go">hypot.go</a>
<a href="http://localhost:6060/src/math/j0.go">j0.go</a>
<a href="http://localhost:6060/src/math/j1.go">j1.go</a>
<a href="http://localhost:6060/src/math/jn.go">jn.go</a>
<a href="http://localhost:6060/src/math/ldexp.go">ldexp.go</a>
<a href="http://localhost:6060/src/math/lgamma.go">lgamma.go</a>
<a href="http://localhost:6060/src/math/log.go">log.go</a>
<a href="http://localhost:6060/src/math/log10.go">log10.go</a>
<a href="http://localhost:6060/src/math/log1p.go">log1p.go</a>
<a href="http://localhost:6060/src/math/logb.go">logb.go</a>
<a href="http://localhost:6060/src/math/mod.go">mod.go</a>
<a href="http://localhost:6060/src/math/modf.go">modf.go</a>
<a href="http://localhost:6060/src/math/nextafter.go">nextafter.go</a>
<a href="http://localhost:6060/src/math/pow.go">pow.go</a>
<a href="http://localhost:6060/src/math/pow10.go">pow10.go</a>
<a href="http://localhost:6060/src/math/remainder.go">remainder.go</a>
<a href="http://localhost:6060/src/math/signbit.go">signbit.go</a>
<a href="http://localhost:6060/src/math/sin.go">sin.go</a>
<a href="http://localhost:6060/src/math/sincos.go">sincos.go</a>
<a href="http://localhost:6060/src/math/sinh.go">sinh.go</a>
<a href="http://localhost:6060/src/math/sqrt.go">sqrt.go</a>
<a href="http://localhost:6060/src/math/tan.go">tan.go</a>
<a href="http://localhost:6060/src/math/tanh.go">tanh.go</a>
<a href="http://localhost:6060/src/math/unsafe.go">unsafe.go</a>
</span>
</p>
</div><!-- .expanded -->
</div><!-- #pkg-index -->
<div id="pkg-callgraph" class="toggle" style="display: none">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Internal Call Graph section">Internal call graph ▹</h2>
</div> <!-- .expanded -->
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Internal Call Graph section">Internal call graph ▾</h2>
<p>
In the call graph viewer below, each node
is a function belonging to this package
and its children are the functions it
calls&mdash;perhaps dynamically.
</p>
<p>
The root nodes are the entry points of the
package: functions that may be called from
outside the package.
There may be non-exported or anonymous
functions among them if they are called
dynamically from another package.
</p>
<p>
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring <code>func</code>
token.
</p>
<p>
Functions may be omitted if they were
determined to be unreachable in the
particular programs or tests that were
analyzed.
</p>
<!-- Zero means show all package entry points. -->
<ul style="margin-left: 0.5in" id="callgraph-0" class="treeview"></ul>
</div>
</div> <!-- #pkg-callgraph -->
<h2 id="pkg-constants">Constants</h2>
<pre>const (
<span id="E">E</span> = 2.71828182845904523536028747135266249775724709369995957496696763 <span class="comment">// http://oeis.org/A001113</span>
<span id="Pi">Pi</span> = 3.14159265358979323846264338327950288419716939937510582097494459 <span class="comment">// http://oeis.org/A000796</span>
<span id="Phi">Phi</span> = 1.61803398874989484820458683436563811772030917980576286213544862 <span class="comment">// http://oeis.org/A001622</span>
<span id="Sqrt2">Sqrt2</span> = 1.41421356237309504880168872420969807856967187537694807317667974 <span class="comment">// http://oeis.org/A002193</span>
<span id="SqrtE">SqrtE</span> = 1.64872127070012814684865078781416357165377610071014801157507931 <span class="comment">// http://oeis.org/A019774</span>
<span id="SqrtPi">SqrtPi</span> = 1.77245385090551602729816748334114518279754945612238712821380779 <span class="comment">// http://oeis.org/A002161</span>
<span id="SqrtPhi">SqrtPhi</span> = 1.27201964951406896425242246173749149171560804184009624861664038 <span class="comment">// http://oeis.org/A139339</span>
<span id="Ln2">Ln2</span> = 0.693147180559945309417232121458176568075500134360255254120680009 <span class="comment">// http://oeis.org/A002162</span>
<span id="Log2E">Log2E</span> = 1 / <a href="index.html#Ln2">Ln2</a>
<span id="Ln10">Ln10</span> = 2.30258509299404568401799145468436420760110148862877297603332790 <span class="comment">// http://oeis.org/A002392</span>
<span id="Log10E">Log10E</span> = 1 / <a href="index.html#Ln10">Ln10</a>
)</pre>
<p>
Mathematical constants.
</p>
<pre>const (
<span id="MaxFloat32">MaxFloat32</span> = 3.40282346638528859811704183484516925440e+38 <span class="comment">// 2**127 * (2**24 - 1) / 2**23</span>
<span id="SmallestNonzeroFloat32">SmallestNonzeroFloat32</span> = 1.401298464324817070923729583289916131280e-45 <span class="comment">// 1 / 2**(127 - 1 + 23)</span>
<span id="MaxFloat64">MaxFloat64</span> = 1.797693134862315708145274237317043567981e+308 <span class="comment">// 2**1023 * (2**53 - 1) / 2**52</span>
<span id="SmallestNonzeroFloat64">SmallestNonzeroFloat64</span> = 4.940656458412465441765687928682213723651e-324 <span class="comment">// 1 / 2**(1023 - 1 + 52)</span>
)</pre>
<p>
Floating-point limit values.
Max is the largest finite value representable by the type.
SmallestNonzero is the smallest positive, non-zero value representable by the type.
</p>
<pre>const (
<span id="MaxInt8">MaxInt8</span> = 1&lt;&lt;7 - 1
<span id="MinInt8">MinInt8</span> = -1 &lt;&lt; 7
<span id="MaxInt16">MaxInt16</span> = 1&lt;&lt;15 - 1
<span id="MinInt16">MinInt16</span> = -1 &lt;&lt; 15
<span id="MaxInt32">MaxInt32</span> = 1&lt;&lt;31 - 1
<span id="MinInt32">MinInt32</span> = -1 &lt;&lt; 31
<span id="MaxInt64">MaxInt64</span> = 1&lt;&lt;63 - 1
<span id="MinInt64">MinInt64</span> = -1 &lt;&lt; 63
<span id="MaxUint8">MaxUint8</span> = 1&lt;&lt;8 - 1
<span id="MaxUint16">MaxUint16</span> = 1&lt;&lt;16 - 1
<span id="MaxUint32">MaxUint32</span> = 1&lt;&lt;32 - 1
<span id="MaxUint64">MaxUint64</span> = 1&lt;&lt;64 - 1
)</pre>
<p>
Integer limit values.
</p>
<h2 id="Abs">func <a href="http://localhost:6060/src/math/abs.go?s=278:305#L2">Abs</a></h2>
<pre>func Abs(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Abs returns the absolute value of x.
</p>
<p>
Special cases are:
</p>
<pre>Abs(±Inf) = +Inf
Abs(NaN) = NaN
</pre>
<h2 id="Acos">func <a href="http://localhost:6060/src/math/asin.go?s=897:925#L41">Acos</a></h2>
<pre>func Acos(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Acos returns the arccosine, in radians, of x.
</p>
<p>
Special case is:
</p>
<pre>Acos(x) = NaN if x &lt; -1 or x &gt; 1
</pre>
<h2 id="Acosh">func <a href="http://localhost:6060/src/math/acosh.go?s=1295:1324#L32">Acosh</a></h2>
<pre>func Acosh(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Acosh returns the inverse hyperbolic cosine of x.
</p>
<p>
Special cases are:
</p>
<pre>Acosh(+Inf) = +Inf
Acosh(x) = NaN if x &lt; 1
Acosh(NaN) = NaN
</pre>
<h2 id="Asin">func <a href="http://localhost:6060/src/math/asin.go?s=434:462#L9">Asin</a></h2>
<pre>func Asin(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Asin returns the arcsine, in radians, of x.
</p>
<p>
Special cases are:
</p>
<pre>Asin(±0) = ±0
Asin(x) = NaN if x &lt; -1 or x &gt; 1
</pre>
<h2 id="Asinh">func <a href="http://localhost:6060/src/math/asinh.go?s=1229:1258#L29">Asinh</a></h2>
<pre>func Asinh(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Asinh returns the inverse hyperbolic sine of x.
</p>
<p>
Special cases are:
</p>
<pre>Asinh(±0) = ±0
Asinh(±Inf) = ±Inf
Asinh(NaN) = NaN
</pre>
<h2 id="Atan">func <a href="http://localhost:6060/src/math/atan.go?s=2901:2929#L85">Atan</a></h2>
<pre>func Atan(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Atan returns the arctangent, in radians, of x.
</p>
<p>
Special cases are:
</p>
<pre>Atan(±0) = ±0
Atan(±Inf) = ±Pi/2
</pre>
<h2 id="Atan2">func <a href="http://localhost:6060/src/math/atan2.go?s=770:802#L19">Atan2</a></h2>
<pre>func Atan2(y, x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Atan2 returns the arc tangent of y/x, using
the signs of the two to determine the quadrant
of the return value.
</p>
<p>
Special cases are (in order):
</p>
<pre>Atan2(y, NaN) = NaN
Atan2(NaN, x) = NaN
Atan2(+0, x&gt;=0) = +0
Atan2(-0, x&gt;=0) = -0
Atan2(+0, x&lt;=-0) = +Pi
Atan2(-0, x&lt;=-0) = -Pi
Atan2(y&gt;0, 0) = +Pi/2
Atan2(y&lt;0, 0) = -Pi/2
Atan2(+Inf, +Inf) = +Pi/4
Atan2(-Inf, +Inf) = -Pi/4
Atan2(+Inf, -Inf) = 3Pi/4
Atan2(-Inf, -Inf) = -3Pi/4
Atan2(y, +Inf) = 0
Atan2(y&gt;0, -Inf) = +Pi
Atan2(y&lt;0, -Inf) = -Pi
Atan2(+Inf, x) = +Pi/2
Atan2(-Inf, x) = -Pi/2
</pre>
<h2 id="Atanh">func <a href="http://localhost:6060/src/math/atanh.go?s=1451:1480#L37">Atanh</a></h2>
<pre>func Atanh(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Atanh returns the inverse hyperbolic tangent of x.
</p>
<p>
Special cases are:
</p>
<pre>Atanh(1) = +Inf
Atanh(±0) = ±0
Atanh(-1) = -Inf
Atanh(x) = NaN if x &lt; -1 or x &gt; 1
Atanh(NaN) = NaN
</pre>
<h2 id="Cbrt">func <a href="http://localhost:6060/src/math/cbrt.go?s=807:835#L15">Cbrt</a></h2>
<pre>func Cbrt(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Cbrt returns the cube root of x.
</p>
<p>
Special cases are:
</p>
<pre>Cbrt(±0) = ±0
Cbrt(±Inf) = ±Inf
Cbrt(NaN) = NaN
</pre>
<h2 id="Ceil">func <a href="http://localhost:6060/src/math/floor.go?s=725:753#L26">Ceil</a></h2>
<pre>func Ceil(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Ceil returns the least integer value greater than or equal to x.
</p>
<p>
Special cases are:
</p>
<pre>Ceil(±0) = ±0
Ceil(±Inf) = ±Inf
Ceil(NaN) = NaN
</pre>
<h2 id="Copysign">func <a href="http://localhost:6060/src/math/copysign.go?s=248:283#L1">Copysign</a></h2>
<pre>func Copysign(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Copysign returns a value with the magnitude
of x and the sign of y.
</p>
<h2 id="Cos">func <a href="http://localhost:6060/src/math/sin.go?s=3697:3724#L107">Cos</a></h2>
<pre>func Cos(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Cos returns the cosine of the radian argument x.
</p>
<p>
Special cases are:
</p>
<pre>Cos(±Inf) = NaN
Cos(NaN) = NaN
</pre>
<h2 id="Cosh">func <a href="http://localhost:6060/src/math/sinh.go?s=1411:1439#L59">Cosh</a></h2>
<pre>func Cosh(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Cosh returns the hyperbolic cosine of x.
</p>
<p>
Special cases are:
</p>
<pre>Cosh(±0) = 1
Cosh(±Inf) = +Inf
Cosh(NaN) = NaN
</pre>
<h2 id="Dim">func <a href="http://localhost:6060/src/math/dim.go?s=324:354#L3">Dim</a></h2>
<pre>func Dim(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Dim returns the maximum of x-y or 0.
</p>
<p>
Special cases are:
</p>
<pre>Dim(+Inf, +Inf) = NaN
Dim(-Inf, -Inf) = NaN
Dim(x, NaN) = Dim(NaN, x) = NaN
</pre>
<h2 id="Erf">func <a href="http://localhost:6060/src/math/erf.go?s=8275:8302#L178">Erf</a></h2>
<pre>func Erf(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Erf returns the error function of x.
</p>
<p>
Special cases are:
</p>
<pre>Erf(+Inf) = 1
Erf(-Inf) = -1
Erf(NaN) = NaN
</pre>
<h2 id="Erfc">func <a href="http://localhost:6060/src/math/erf.go?s=10020:10048#L255">Erfc</a></h2>
<pre>func Erfc(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Erfc returns the complementary error function of x.
</p>
<p>
Special cases are:
</p>
<pre>Erfc(+Inf) = 0
Erfc(-Inf) = 2
Erfc(NaN) = NaN
</pre>
<h2 id="Exp">func <a href="http://localhost:6060/src/math/exp.go?s=368:395#L4">Exp</a></h2>
<pre>func Exp(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Exp returns e**x, the base-e exponential of x.
</p>
<p>
Special cases are:
</p>
<pre>Exp(+Inf) = +Inf
Exp(NaN) = NaN
</pre>
<p>
Very large values overflow to 0 or +Inf.
Very small values underflow to 1.
</p>
<h2 id="Exp2">func <a href="http://localhost:6060/src/math/exp.go?s=4062:4090#L125">Exp2</a></h2>
<pre>func Exp2(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Exp2 returns 2**x, the base-2 exponential of x.
</p>
<p>
Special cases are the same as Exp.
</p>
<h2 id="Expm1">func <a href="http://localhost:6060/src/math/expm1.go?s=5196:5225#L114">Expm1</a></h2>
<pre>func Expm1(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Expm1 returns e**x - 1, the base-e exponential of x minus 1.
It is more accurate than Exp(x) - 1 when x is near zero.
</p>
<p>
Special cases are:
</p>
<pre>Expm1(+Inf) = +Inf
Expm1(-Inf) = -1
Expm1(NaN) = NaN
</pre>
<p>
Very large values overflow to -1 or +Inf.
</p>
<h2 id="Float32bits">func <a href="http://localhost:6060/src/math/unsafe.go?s=255:289#L1">Float32bits</a></h2>
<pre>func Float32bits(f <a href="../builtin/index.html#float32">float32</a>) <a href="../builtin/index.html#uint32">uint32</a></pre>
<p>
Float32bits returns the IEEE 754 binary representation of f.
</p>
<h2 id="Float32frombits">func <a href="http://localhost:6060/src/math/unsafe.go?s=444:482#L4">Float32frombits</a></h2>
<pre>func Float32frombits(b <a href="../builtin/index.html#uint32">uint32</a>) <a href="../builtin/index.html#float32">float32</a></pre>
<p>
Float32frombits returns the floating point number corresponding
to the IEEE 754 binary representation b.
</p>
<h2 id="Float64bits">func <a href="http://localhost:6060/src/math/unsafe.go?s=591:625#L7">Float64bits</a></h2>
<pre>func Float64bits(f <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#uint64">uint64</a></pre>
<p>
Float64bits returns the IEEE 754 binary representation of f.
</p>
<h2 id="Float64frombits">func <a href="http://localhost:6060/src/math/unsafe.go?s=777:815#L11">Float64frombits</a></h2>
<pre>func Float64frombits(b <a href="../builtin/index.html#uint64">uint64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Float64frombits returns the floating point number corresponding
the IEEE 754 binary representation b.
</p>
<h2 id="Floor">func <a href="http://localhost:6060/src/math/floor.go?s=337:366#L3">Floor</a></h2>
<pre>func Floor(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Floor returns the greatest integer value less than or equal to x.
</p>
<p>
Special cases are:
</p>
<pre>Floor(±0) = ±0
Floor(±Inf) = ±Inf
Floor(NaN) = NaN
</pre>
<h2 id="Frexp">func <a href="http://localhost:6060/src/math/frexp.go?s=469:514#L6">Frexp</a></h2>
<pre>func Frexp(f <a href="../builtin/index.html#float64">float64</a>) (frac <a href="../builtin/index.html#float64">float64</a>, exp <a href="../builtin/index.html#int">int</a>)</pre>
<p>
Frexp breaks f into a normalized fraction
and an integral power of two.
It returns frac and exp satisfying f == frac × 2**exp,
with the absolute value of frac in the interval [½, 1).
</p>
<p>
Special cases are:
</p>
<pre>Frexp(±0) = ±0, 0
Frexp(±Inf) = ±Inf, 0
Frexp(NaN) = NaN, 0
</pre>
<h2 id="Gamma">func <a href="http://localhost:6060/src/math/gamma.go?s=3626:3655#L112">Gamma</a></h2>
<pre>func Gamma(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Gamma returns the Gamma function of x.
</p>
<p>
Special cases are:
</p>
<pre>Gamma(+Inf) = +Inf
Gamma(+0) = +Inf
Gamma(-0) = -Inf
Gamma(x) = NaN for integer x &lt; 0
Gamma(-Inf) = NaN
Gamma(NaN) = NaN
</pre>
<h2 id="Hypot">func <a href="http://localhost:6060/src/math/hypot.go?s=464:496#L9">Hypot</a></h2>
<pre>func Hypot(p, q <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Hypot returns Sqrt(p*p + q*q), taking care to avoid
unnecessary overflow and underflow.
</p>
<p>
Special cases are:
</p>
<pre>Hypot(±Inf, q) = +Inf
Hypot(p, ±Inf) = +Inf
Hypot(NaN, q) = NaN
Hypot(p, NaN) = NaN
</pre>
<h2 id="Ilogb">func <a href="http://localhost:6060/src/math/logb.go?s=641:666#L22">Ilogb</a></h2>
<pre>func Ilogb(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#int">int</a></pre>
<p>
Ilogb returns the binary exponent of x as an integer.
</p>
<p>
Special cases are:
</p>
<pre>Ilogb(±Inf) = MaxInt32
Ilogb(0) = MinInt32
Ilogb(NaN) = MaxInt32
</pre>
<h2 id="Inf">func <a href="http://localhost:6060/src/math/bits.go?s=415:441#L7">Inf</a></h2>
<pre>func Inf(sign <a href="../builtin/index.html#int">int</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Inf returns positive infinity if sign &gt;= 0, negative infinity if sign &lt; 0.
</p>
<h2 id="IsInf">func <a href="http://localhost:6060/src/math/bits.go?s=1213:1249#L33">IsInf</a></h2>
<pre>func IsInf(f <a href="../builtin/index.html#float64">float64</a>, sign <a href="../builtin/index.html#int">int</a>) <a href="../builtin/index.html#bool">bool</a></pre>
<p>
IsInf reports whether f is an infinity, according to sign.
If sign &gt; 0, IsInf reports whether f is positive infinity.
If sign &lt; 0, IsInf reports whether f is negative infinity.
If sign == 0, IsInf reports whether f is either infinity.
</p>
<h2 id="IsNaN">func <a href="http://localhost:6060/src/math/bits.go?s=715:746#L21">IsNaN</a></h2>
<pre>func IsNaN(f <a href="../builtin/index.html#float64">float64</a>) (is <a href="../builtin/index.html#bool">bool</a>)</pre>
<p>
IsNaN reports whether f is an IEEE 754 &ldquo;not-a-number&rdquo; value.
</p>
<h2 id="J0">func <a href="http://localhost:6060/src/math/j0.go?s=2892:2918#L66">J0</a></h2>
<pre>func J0(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
J0 returns the order-zero Bessel function of the first kind.
</p>
<p>
Special cases are:
</p>
<pre>J0(±Inf) = 0
J0(0) = 1
J0(NaN) = NaN
</pre>
<h2 id="J1">func <a href="http://localhost:6060/src/math/j1.go?s=2945:2971#L64">J1</a></h2>
<pre>func J1(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
J1 returns the order-one Bessel function of the first kind.
</p>
<p>
Special cases are:
</p>
<pre>J1(±Inf) = 0
J1(NaN) = NaN
</pre>
<h2 id="Jn">func <a href="http://localhost:6060/src/math/jn.go?s=1827:1860#L43">Jn</a></h2>
<pre>func Jn(n <a href="../builtin/index.html#int">int</a>, x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Jn returns the order-n Bessel function of the first kind.
</p>
<p>
Special cases are:
</p>
<pre>Jn(n, ±Inf) = 0
Jn(n, NaN) = NaN
</pre>
<h2 id="Ldexp">func <a href="http://localhost:6060/src/math/ldexp.go?s=342:383#L4">Ldexp</a></h2>
<pre>func Ldexp(frac <a href="../builtin/index.html#float64">float64</a>, exp <a href="../builtin/index.html#int">int</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Ldexp is the inverse of Frexp.
It returns frac × 2**exp.
</p>
<p>
Special cases are:
</p>
<pre>Ldexp(±0, exp) = ±0
Ldexp(±Inf, exp) = ±Inf
Ldexp(NaN, exp) = NaN
</pre>
<h2 id="Lgamma">func <a href="http://localhost:6060/src/math/lgamma.go?s=6985:7034#L164">Lgamma</a></h2>
<pre>func Lgamma(x <a href="../builtin/index.html#float64">float64</a>) (lgamma <a href="../builtin/index.html#float64">float64</a>, sign <a href="../builtin/index.html#int">int</a>)</pre>
<p>
Lgamma returns the natural logarithm and sign (-1 or +1) of Gamma(x).
</p>
<p>
Special cases are:
</p>
<pre>Lgamma(+Inf) = +Inf
Lgamma(0) = +Inf
Lgamma(-integer) = +Inf
Lgamma(-Inf) = -Inf
Lgamma(NaN) = NaN
</pre>
<h2 id="Log">func <a href="http://localhost:6060/src/math/log.go?s=2810:2837#L70">Log</a></h2>
<pre>func Log(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Log returns the natural logarithm of x.
</p>
<p>
Special cases are:
</p>
<pre>Log(+Inf) = +Inf
Log(0) = -Inf
Log(x &lt; 0) = NaN
Log(NaN) = NaN
</pre>
<h2 id="Log10">func <a href="http://localhost:6060/src/math/log10.go?s=265:294#L1">Log10</a></h2>
<pre>func Log10(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Log10 returns the decimal logarithm of x.
The special cases are the same as for Log.
</p>
<h2 id="Log1p">func <a href="http://localhost:6060/src/math/log1p.go?s=3723:3752#L85">Log1p</a></h2>
<pre>func Log1p(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Log1p returns the natural logarithm of 1 plus its argument x.
It is more accurate than Log(1 + x) when x is near zero.
</p>
<p>
Special cases are:
</p>
<pre>Log1p(+Inf) = +Inf
Log1p(±0) = ±0
Log1p(-1) = -Inf
Log1p(x &lt; -1) = NaN
Log1p(NaN) = NaN
</pre>
<h2 id="Log2">func <a href="http://localhost:6060/src/math/log10.go?s=448:476#L7">Log2</a></h2>
<pre>func Log2(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Log2 returns the binary logarithm of x.
The special cases are the same as for Log.
</p>
<h2 id="Logb">func <a href="http://localhost:6060/src/math/logb.go?s=300:328#L3">Logb</a></h2>
<pre>func Logb(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Logb returns the binary exponent of x.
</p>
<p>
Special cases are:
</p>
<pre>Logb(±Inf) = +Inf
Logb(0) = -Inf
Logb(NaN) = NaN
</pre>
<h2 id="Max">func <a href="http://localhost:6060/src/math/dim.go?s=603:633#L16">Max</a></h2>
<pre>func Max(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Max returns the larger of x or y.
</p>
<p>
Special cases are:
</p>
<pre>Max(x, +Inf) = Max(+Inf, x) = +Inf
Max(x, NaN) = Max(NaN, x) = NaN
Max(+0, ±0) = Max(±0, +0) = +0
Max(-0, -0) = -0
</pre>
<h2 id="Min">func <a href="http://localhost:6060/src/math/dim.go?s=1072:1102#L43">Min</a></h2>
<pre>func Min(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Min returns the smaller of x or y.
</p>
<p>
Special cases are:
</p>
<pre>Min(x, -Inf) = Min(-Inf, x) = -Inf
Min(x, NaN) = Min(NaN, x) = NaN
Min(-0, ±0) = Min(±0, -0) = -0
</pre>
<h2 id="Mod">func <a href="http://localhost:6060/src/math/mod.go?s=483:513#L11">Mod</a></h2>
<pre>func Mod(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Mod returns the floating-point remainder of x/y.
The magnitude of the result is less than y and its
sign agrees with that of x.
</p>
<p>
Special cases are:
</p>
<pre>Mod(±Inf, y) = NaN
Mod(NaN, y) = NaN
Mod(x, 0) = NaN
Mod(x, ±Inf) = x
Mod(x, NaN) = NaN
</pre>
<h2 id="Modf">func <a href="http://localhost:6060/src/math/modf.go?s=369:417#L3">Modf</a></h2>
<pre>func Modf(f <a href="../builtin/index.html#float64">float64</a>) (int <a href="../builtin/index.html#float64">float64</a>, frac <a href="../builtin/index.html#float64">float64</a>)</pre>
<p>
Modf returns integer and fractional floating-point numbers
that sum to f. Both values have the same sign as f.
</p>
<p>
Special cases are:
</p>
<pre>Modf(±Inf) = ±Inf, NaN
Modf(NaN) = NaN, NaN
</pre>
<h2 id="NaN">func <a href="http://localhost:6060/src/math/bits.go?s=595:613#L18">NaN</a></h2>
<pre>func NaN() <a href="../builtin/index.html#float64">float64</a></pre>
<p>
NaN returns an IEEE 754 &ldquo;not-a-number&rdquo; value.
</p>
<h2 id="Nextafter">func <a href="http://localhost:6060/src/math/nextafter.go?s=917:957#L25">Nextafter</a></h2>
<pre>func Nextafter(x, y <a href="../builtin/index.html#float64">float64</a>) (r <a href="../builtin/index.html#float64">float64</a>)</pre>
<p>
Nextafter returns the next representable float64 value after x towards y.
</p>
<p>
Special cases are:
</p>
<pre>Nextafter(x, x) = x
Nextafter(NaN, y) = NaN
Nextafter(x, NaN) = NaN
</pre>
<h2 id="Nextafter32">func <a href="http://localhost:6060/src/math/nextafter.go?s=363:405#L3">Nextafter32</a></h2>
<pre>func Nextafter32(x, y <a href="../builtin/index.html#float32">float32</a>) (r <a href="../builtin/index.html#float32">float32</a>)</pre>
<p>
Nextafter32 returns the next representable float32 value after x towards y.
</p>
<p>
Special cases are:
</p>
<pre>Nextafter32(x, x) = x
Nextafter32(NaN, y) = NaN
Nextafter32(x, NaN) = NaN
</pre>
<h2 id="Pow">func <a href="http://localhost:6060/src/math/pow.go?s=1186:1216#L28">Pow</a></h2>
<pre>func Pow(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Pow returns x**y, the base-x exponential of y.
</p>
<p>
Special cases are (in order):
</p>
<pre>Pow(x, ±0) = 1 for any x
Pow(1, y) = 1 for any y
Pow(x, 1) = x for any x
Pow(NaN, y) = NaN
Pow(x, NaN) = NaN
Pow(±0, y) = ±Inf for y an odd integer &lt; 0
Pow(±0, -Inf) = +Inf
Pow(±0, +Inf) = +0
Pow(±0, y) = +Inf for finite y &lt; 0 and not an odd integer
Pow(±0, y) = ±0 for y an odd integer &gt; 0
Pow(±0, y) = +0 for finite y &gt; 0 and not an odd integer
Pow(-1, ±Inf) = 1
Pow(x, +Inf) = +Inf for |x| &gt; 1
Pow(x, -Inf) = +0 for |x| &gt; 1
Pow(x, +Inf) = +0 for |x| &lt; 1
Pow(x, -Inf) = +Inf for |x| &lt; 1
Pow(+Inf, y) = +Inf for y &gt; 0
Pow(+Inf, y) = +0 for y &lt; 0
Pow(-Inf, y) = Pow(-0, -y)
Pow(x, y) = NaN for finite x &lt; 0 and finite non-integer y
</pre>
<h2 id="Pow10">func <a href="http://localhost:6060/src/math/pow10.go?s=445:470#L6">Pow10</a></h2>
<pre>func Pow10(e <a href="../builtin/index.html#int">int</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Pow10 returns 10**e, the base-10 exponential of e.
</p>
<p>
Special cases are:
</p>
<pre>Pow10(e) = +Inf for e &gt; 309
Pow10(e) = 0 for e &lt; -324
</pre>
<h2 id="Remainder">func <a href="http://localhost:6060/src/math/remainder.go?s=1284:1320#L27">Remainder</a></h2>
<pre>func Remainder(x, y <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Remainder returns the IEEE 754 floating-point remainder of x/y.
</p>
<p>
Special cases are:
</p>
<pre>Remainder(±Inf, y) = NaN
Remainder(NaN, y) = NaN
Remainder(x, 0) = NaN
Remainder(x, ±Inf) = x
Remainder(x, NaN) = NaN
</pre>
<h2 id="Signbit">func <a href="http://localhost:6060/src/math/signbit.go?s=233:261#L1">Signbit</a></h2>
<pre>func Signbit(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#bool">bool</a></pre>
<p>
Signbit returns true if x is negative or negative zero.
</p>
<h2 id="Sin">func <a href="http://localhost:6060/src/math/sin.go?s=5091:5118#L164">Sin</a></h2>
<pre>func Sin(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Sin returns the sine of the radian argument x.
</p>
<p>
Special cases are:
</p>
<pre>Sin(±0) = ±0
Sin(±Inf) = NaN
Sin(NaN) = NaN
</pre>
<h2 id="Sincos">func <a href="http://localhost:6060/src/math/sincos.go?s=376:417#L5">Sincos</a></h2>
<pre>func Sincos(x <a href="../builtin/index.html#float64">float64</a>) (sin, cos <a href="../builtin/index.html#float64">float64</a>)</pre>
<p>
Sincos returns Sin(x), Cos(x).
</p>
<p>
Special cases are:
</p>
<pre>Sincos(±0) = ±0, 1
Sincos(±Inf) = NaN, NaN
Sincos(NaN) = NaN, NaN
</pre>
<h2 id="Sinh">func <a href="http://localhost:6060/src/math/sinh.go?s=564:592#L15">Sinh</a></h2>
<pre>func Sinh(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Sinh returns the hyperbolic sine of x.
</p>
<p>
Special cases are:
</p>
<pre>Sinh(±0) = ±0
Sinh(±Inf) = ±Inf
Sinh(NaN) = NaN
</pre>
<h2 id="Sqrt">func <a href="http://localhost:6060/src/math/sqrt.go?s=3704:3732#L82">Sqrt</a></h2>
<pre>func Sqrt(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Sqrt returns the square root of x.
</p>
<p>
Special cases are:
</p>
<pre>Sqrt(+Inf) = +Inf
Sqrt(±0) = ±0
Sqrt(x &lt; 0) = NaN
Sqrt(NaN) = NaN
</pre>
<h2 id="Tan">func <a href="http://localhost:6060/src/math/tan.go?s=2594:2621#L72">Tan</a></h2>
<pre>func Tan(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Tan returns the tangent of the radian argument x.
</p>
<p>
Special cases are:
</p>
<pre>Tan(±0) = ±0
Tan(±Inf) = NaN
Tan(NaN) = NaN
</pre>
<h2 id="Tanh">func <a href="http://localhost:6060/src/math/tanh.go?s=2211:2239#L64">Tanh</a></h2>
<pre>func Tanh(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Tanh returns the hyperbolic tangent of x.
</p>
<p>
Special cases are:
</p>
<pre>Tanh(±0) = ±0
Tanh(±Inf) = ±1
Tanh(NaN) = NaN
</pre>
<h2 id="Trunc">func <a href="http://localhost:6060/src/math/floor.go?s=938:967#L38">Trunc</a></h2>
<pre>func Trunc(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Trunc returns the integer value of x.
</p>
<p>
Special cases are:
</p>
<pre>Trunc(±0) = ±0
Trunc(±Inf) = ±Inf
Trunc(NaN) = NaN
</pre>
<h2 id="Y0">func <a href="http://localhost:6060/src/math/j0.go?s=4811:4837#L146">Y0</a></h2>
<pre>func Y0(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Y0 returns the order-zero Bessel function of the second kind.
</p>
<p>
Special cases are:
</p>
<pre>Y0(+Inf) = 0
Y0(0) = -Inf
Y0(x &lt; 0) = NaN
Y0(NaN) = NaN
</pre>
<h2 id="Y1">func <a href="http://localhost:6060/src/math/j1.go?s=4735:4761#L144">Y1</a></h2>
<pre>func Y1(x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Y1 returns the order-one Bessel function of the second kind.
</p>
<p>
Special cases are:
</p>
<pre>Y1(+Inf) = 0
Y1(0) = -Inf
Y1(x &lt; 0) = NaN
Y1(NaN) = NaN
</pre>
<h2 id="Yn">func <a href="http://localhost:6060/src/math/jn.go?s=6101:6134#L223">Yn</a></h2>
<pre>func Yn(n <a href="../builtin/index.html#int">int</a>, x <a href="../builtin/index.html#float64">float64</a>) <a href="../builtin/index.html#float64">float64</a></pre>
<p>
Yn returns the order-n Bessel function of the second kind.
</p>
<p>
Special cases are:
</p>
<pre>Yn(n, +Inf) = 0
Yn(n &gt; 0, 0) = -Inf
Yn(n &lt; 0, 0) = +Inf if n is odd, -Inf if n is even
Y1(n, x &lt; 0) = NaN
Y1(n, NaN) = NaN
</pre>
<h2 id="pkg-subdirectories">Subdirectories</h2>
<div class="pkg-dir">
<table>
<tr>
<th class="pkg-name">Name</th>
<th class="pkg-synopsis">Synopsis</th>
</tr>
<tr>
<td colspan="2"><a href="http://localhost:6060/pkg/">..</a></td>
</tr>
<tr>
<td class="pkg-name" style="padding-left: 0px;">
<a href="big/index.html">big</a>
</td>
<td class="pkg-synopsis">
Package big implements arbitrary-precision arithmetic (big numbers).
</td>
</tr>
<tr>
<td class="pkg-name" style="padding-left: 0px;">
<a href="cmplx/index.html">cmplx</a>
</td>
<td class="pkg-synopsis">
Package cmplx provides basic constants and mathematical functions for complex numbers.
</td>
</tr>
<tr>
<td class="pkg-name" style="padding-left: 0px;">
<a href="rand/index.html">rand</a>
</td>
<td class="pkg-synopsis">
Package rand implements pseudo-random number generators.
</td>
</tr>
</table>
</div>
<div id="footer">
Build version go1.6.<br>
Except as <a href="https://developers.google.com/site-policies#restrictions">noted</a>,
the content of this page is licensed under the
Creative Commons Attribution 3.0 License,
and code is licensed under a <a href="http://localhost:6060/LICENSE">BSD license</a>.<br>
<a href="http://localhost:6060/doc/tos.html">Terms of Service</a> |
<a href="http://www.google.com/intl/en/policies/privacy/">Privacy Policy</a>
</div>
</div><!-- .container -->
</div><!-- #page -->
<!-- TODO(adonovan): load these from <head> using "defer" attribute? -->
<script type="text/javascript" src="../../lib/godoc/jquery.js"></script>
<script type="text/javascript" src="../../lib/godoc/jquery.treeview.js"></script>
<script type="text/javascript" src="../../lib/godoc/jquery.treeview.edit.js"></script>
<script type="text/javascript" src="../../lib/godoc/godocs.js"></script>
</body>
</html>