Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— |
kennen:include:cmath [2016-12-03 15:07] (aktuell) |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== <cmath> ====== | ||
+ | ===== Funktionen ===== | ||
+ | Aufgelistet sind die Funktionen für ''double''-Argumente. | ||
+ | Daneben gibt es überladene Versionen für ''float'' und ''long double'', die den gleichen Typ zurückliefern. | ||
+ | Für einige Funktionen definierte die Sprache C Versionen mit Endungen ''f'' bzw. ''l'', | ||
+ | diese werden hier nicht aufgeführt. | ||
+ | |||
+ | ==== Zahleigenschaften ==== | ||
+ | <code cpp> | ||
+ | bool isfinite (double x) | ||
+ | </code> | ||
+ | [[..:lib:isfinite|Beschreibung]]: | ||
+ | Liefert ''true'', wenn die Zahl im Bereich $(-\infty,\infty)$ liegt. | ||
+ | |||
+ | <code cpp> | ||
+ | bool isinf (double x) | ||
+ | </code> | ||
+ | [[..:lib:isinf|Beschreibung]]: | ||
+ | Liefert ''true'', wenn die Zahl $-\infty$ oder $\infty$ ist. | ||
+ | |||
+ | <code cpp> | ||
+ | bool isnan (double x) | ||
+ | </code> | ||
+ | [[..:lib:isnan|Beschreibung]]: | ||
+ | Liefert ''true'', wenn ''x'' keine darstellbare Zahl ("not a number") ist. | ||
+ | |||
+ | <code cpp> | ||
+ | bool isnormal (double x) | ||
+ | </code> | ||
+ | [[..:lib:isnormal|Beschreibung]]: | ||
+ | Liefert ''true'', wenn die Gleitkommazahl ''x'' normalisiert ist. | ||
+ | |||
+ | <code cpp> | ||
+ | bool isunordered (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:isunordered|Beschreibung]]: | ||
+ | Liefert ''true'', wenn die Argumente keine der drei Relationen ''x<y'', ''x==y'', ''x>y'' erfüllen (Vergleich mit NaNs). | ||
+ | |||
+ | ==== Vorzeichen ==== | ||
+ | <code cpp> | ||
+ | double abs (double x) | ||
+ | </code> | ||
+ | [[..:lib:abs|Beschreibung]]: | ||
+ | Liefert den Absolutbetrag der Zahl ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double fabs (double x) | ||
+ | </code> | ||
+ | [[..:lib:fabs|Beschreibung]]: | ||
+ | Liefert den Absolutbetrag der Zahl ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | bool signbit (double x) | ||
+ | </code> | ||
+ | [[..:lib:signbit|Beschreibung]]: | ||
+ | Liefert ''true'' für Zahlen ''x'' mit negativem Vorzeichen. | ||
+ | |||
+ | <code cpp> | ||
+ | double copysign (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:copysign|Beschreibung]]: | ||
+ | Liefert $|x| \cdot sgn(y)$ mit dem Betrag von ''x'' und dem Vorzeichen von ''y''. | ||
+ | |||
+ | ==== Runden ==== | ||
+ | <code cpp> | ||
+ | double ceil (double x) | ||
+ | </code> | ||
+ | [[..:lib:ceil|Beschreibung]]: | ||
+ | Liefert die kleinste Ganzzahl $n \geq x$. | ||
+ | |||
+ | <code cpp> | ||
+ | double floor (double x) | ||
+ | </code> | ||
+ | [[..:lib:floor|Beschreibung]]: | ||
+ | Liefert die größte Ganzzahl $n \leq x$. | ||
+ | |||
+ | <code cpp> | ||
+ | double nearbyint (double x) | ||
+ | </code> | ||
+ | [[..:lib:nearbyint|Beschreibung]]: | ||
+ | Liefert die nächstgelegene Ganzzahl mit der aktuell vorgebenen Rundungsrichtung, ohne ''FE_INEXACT''-Ausnahme der Gleitkommaeinheit zu setzen. | ||
+ | |||
+ | <code cpp> | ||
+ | long lrint (double x) | ||
+ | long long llrint (double x) | ||
+ | double rint (double x) | ||
+ | </code> | ||
+ | [[..:lib:rint|Beschreibung]]: | ||
+ | Liefert die nächstgelegene Ganzzahl mit der aktuell vorgebenen Rundungsrichtung, | ||
+ | setzt ''FE_INEXACT''-Ausnahme der Gleitkommaeinheit, | ||
+ | wenn Ergebnis != x. | ||
+ | |||
+ | <code cpp> | ||
+ | long lround (double x) | ||
+ | long long llround (double x) | ||
+ | double round(double x) | ||
+ | </code> | ||
+ | [[..:lib:round|Beschreibung]]: | ||
+ | Rundet zur nächstgelegenen Ganzzahl $n\leq x$ (bei $n,5$ bei von Null weg gerundet). | ||
+ | |||
+ | <code cpp> | ||
+ | double nextafter (double x, double y) | ||
+ | double nexttoward (double x, long double y) | ||
+ | </code> | ||
+ | [[..:lib:nextafter|Beschreibung]]: | ||
+ | Liefert die nächste darstellbare Gleitkommazahl nach ''x'' in Richtung ''y''. | ||
+ | |||
+ | <code cpp> | ||
+ | double trunc (double x) | ||
+ | </code> | ||
+ | [[..:lib:trunc|Beschreibung]]: | ||
+ | Schneidet den Nachkommaanteil der Zahl ''x'' ab (rundet zu Null hin). | ||
+ | |||
+ | ==== Arithmetik ==== | ||
+ | <code cpp> | ||
+ | double fmax (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:fmax|Beschreibung]]: | ||
+ | Liefert den größten der beiden Werte, auch für NANs. | ||
+ | |||
+ | <code cpp> | ||
+ | double fmin (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:fmin|Beschreibung]]: | ||
+ | Liefert den kleinsten der beiden Werte, auch für NANs. | ||
+ | |||
+ | <code cpp> | ||
+ | double fdim (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:fdim|Beschreibung]]: | ||
+ | Liefert positive Differenz von ''x'' und ''y'' oder 0. | ||
+ | |||
+ | <code cpp> | ||
+ | double fma (double x, double x, double z) | ||
+ | </code> | ||
+ | [[..:lib:fma|Beschreibung]]: | ||
+ | Liefert ''x*y + z'' mit nur einer Rundung. | ||
+ | |||
+ | <code cpp> | ||
+ | double fmod (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:fmod|Beschreibung]]: | ||
+ | Liefert Gleitkommarest der Division ''zaehler/nenner''. | ||
+ | Liefert Gleitkommarest $r = x - n y$ | ||
+ | mit ganzzahligem Quotienten $n$, so dass | ||
+ | $|r|<|y|$ und $sgn(r) = sgn(y)$. | ||
+ | |||
+ | <code cpp> | ||
+ | double modf (double x, double *ganzzahl) | ||
+ | </code> | ||
+ | [[..:lib:modf|Beschreibung]]: | ||
+ | Spaltet ''ganzzahl'' von ''x'' ab und liefert den Nachkommaanteil. | ||
+ | |||
+ | <code cpp> | ||
+ | double remainder (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:remainder|Beschreibung]]: | ||
+ | Liefert $r = x - n y$ mit nächstgelegenem ganzzahligen Quotienten $n$. | ||
+ | Bei $|n - x/y| = 0.5$ ist $n$ gerade. | ||
+ | |||
+ | <code cpp> | ||
+ | double remquo (double x, double y, int* n) | ||
+ | </code> | ||
+ | [[..:lib:remquo|Beschreibung]]: | ||
+ | Liefert $r = x - n y$ und den nächstgelegenen ganzzahligen Quotienten $n$. | ||
+ | Bei $|n - x/y| = 0.5$ ist $n$ gerade. | ||
+ | |||
+ | ==== Potenzieren und Logarithmieren ==== | ||
+ | <code cpp> | ||
+ | double exp (double x) | ||
+ | </code> | ||
+ | [[..:lib:exp|Beschreibung]]: | ||
+ | Liefert $e^x$. | ||
+ | |||
+ | <code cpp> | ||
+ | double exp1m (double x) | ||
+ | </code> | ||
+ | [[..:lib:exp1m|Beschreibung]]: | ||
+ | Liefert $e^x-1$. | ||
+ | |||
+ | <code cpp> | ||
+ | double exp2 (double x) | ||
+ | </code> | ||
+ | [[..:lib:exp2|Beschreibung]]: | ||
+ | Liefert $2^x$. | ||
+ | |||
+ | <code cpp> | ||
+ | double log (double x) | ||
+ | </code> | ||
+ | [[..:lib:log|Beschreibung]]: | ||
+ | Liefert den natürlichen Logarithmus $\ln x$ zur Basis e für $x>0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double log1p (double x) | ||
+ | </code> | ||
+ | [[..:lib:log1p|Beschreibung]]: | ||
+ | Liefert $\ln (1+x)$ für $x>-1$. | ||
+ | |||
+ | <code cpp> | ||
+ | double log2 (double x) | ||
+ | </code> | ||
+ | [[..:lib:log2|Beschreibung]]: | ||
+ | Liefert den Logarithmus von ''x'' zur Basis 2 für $x>0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double logb (double x) | ||
+ | </code> | ||
+ | [[..:lib:log2|Beschreibung]]: | ||
+ | Liefert den ganzzahligen Logarithmus von ''x'' zur Basis 2 für $x>0$. | ||
+ | |||
+ | <code cpp> | ||
+ | int ilogb (double x) | ||
+ | </code> | ||
+ | [[..:lib:ilogb|Beschreibung]]: | ||
+ | Liefert den ganzzahligen Logarithmus von ''x'' zur Basis 2 für $x>0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double log10 (double x) | ||
+ | </code> | ||
+ | [[..:lib:log10|Beschreibung]]: | ||
+ | Liefert den Logarithmus von ''x'' zur Basis 10 für $x>0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double pow (double x, double y) | ||
+ | </code> | ||
+ | [[..:lib:pow|Beschreibung]]: | ||
+ | Liefert die Potenz $x^y$. Für $x<0$ muss $y$ ganzzahlig sein. | ||
+ | |||
+ | <code cpp> | ||
+ | double sqrt (double x) | ||
+ | </code> | ||
+ | [[..:lib:sqrt|Beschreibung]]: | ||
+ | Liefert die Quadratwurzel $\sqrt{x}$ von nichtnegativen ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double cbrt (double x) | ||
+ | </code> | ||
+ | [[..:lib:cbrt|Beschreibung]]: | ||
+ | Liefert die Kubikwurzel $\sqrt[3]{x}$ von ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double hypot (double x, double y) | ||
+ | double hypot (double x, double y, double z) // seit C++17 | ||
+ | </code> | ||
+ | [[..:lib:hypot|Beschreibung]]: | ||
+ | Liefert die Hypotenuse $\sqrt{x^2 +y^2}$ zweier Kathetenlängen ''x'' und ''y'' | ||
+ | bzw. die Länge der Raumdiagonale eines Quaders mit den drei Kantenlängen ''x'', ''y'' und ''z''. | ||
+ | |||
+ | <code cpp> | ||
+ | double frexp (double x, int *n) | ||
+ | </code> | ||
+ | [[..:lib:frexp|Beschreibung]]: | ||
+ | Zerlegt ''x'' so in $m\cdot 2^n$, dass 0.5$<$''fabs(m)''$\leq 1$. Liefert die Mantisse m als Rückgabewert. | ||
+ | |||
+ | <code cpp> | ||
+ | double ldexp (double x, int n) | ||
+ | </code> | ||
+ | [[..:lib:ldexp|Beschreibung]]: | ||
+ | Liefert $x\cdot 2^n$. | ||
+ | |||
+ | <code cpp> | ||
+ | double scalbn (double x, int n) | ||
+ | </code> | ||
+ | [[..:lib:scalbn|Beschreibung]]: | ||
+ | Liefert $x\cdot b^n$ mit $b$ = [[..:include:cfloat|FLT_RADIX]]. | ||
+ | |||
+ | ==== Trigonometrische Funktionen ==== | ||
+ | <code cpp> | ||
+ | double cos (double x) | ||
+ | </code> | ||
+ | [[..:lib:cos|Beschreibung]]: | ||
+ | Liefert den Cosinus von ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double sin (double x) | ||
+ | </code> | ||
+ | [[..:lib:sin|Beschreibung]]: | ||
+ | Liefert den Sinus von ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double tan (double x) | ||
+ | </code> | ||
+ | [[..:lib:tan|Beschreibung]]: | ||
+ | Liefert den Tangens von ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double acos (double x) | ||
+ | </code> | ||
+ | [[..:lib:acos|Beschreibung]]: | ||
+ | Liefert den Arcuscosinus von ''x'' für $-1\leq x\leq 1$. | ||
+ | |||
+ | <code cpp> | ||
+ | double asin (double x) | ||
+ | </code> | ||
+ | [[..:lib:asin|Beschreibung]]: | ||
+ | Liefert den Arcussinus von ''x'' für $-1\leq x\leq 1$. | ||
+ | |||
+ | <code cpp> | ||
+ | double atan2 (double y, double x) | ||
+ | </code> | ||
+ | [[..:lib:atan2|Beschreibung]]: | ||
+ | Liefert den Arcustangens von $y/x$. Das Ergebnis liegt im Bereich $(- \pi, \pi)$. Beide Argumente dürfen 0 sein, jedoch nicht gleichzeitig. | ||
+ | |||
+ | <code cpp> | ||
+ | double atan (double x) | ||
+ | </code> | ||
+ | [[..:lib:atan|Beschreibung]]: | ||
+ | Liefert den Arcustangens von ''x''. Das Ergebnis liegt im Bereich $(- \pi/2, \pi/2)$. | ||
+ | |||
+ | ==== Hyberbelfunktionen ==== | ||
+ | <code cpp> | ||
+ | double cosh (double x) | ||
+ | </code> | ||
+ | [[..:lib:cosh|Beschreibung]]: | ||
+ | Liefert den Cosinus hyberbolicus von ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double sinh (double x) | ||
+ | </code> | ||
+ | [[..:lib:sinh|Beschreibung]]: | ||
+ | Liefert den Sinus hyberbolicus von ''x''. | ||
+ | |||
+ | <code cpp> | ||
+ | double tanh (double x) | ||
+ | </code> | ||
+ | [[..:lib:tanh|Beschreibung]]: | ||
+ | Liefert den Tangens hyberbolicus von ''x''. | ||
+ | |||
+ | ===== Höhere Funktionen ===== | ||
+ | <code cpp> | ||
+ | double erf (double x) | ||
+ | </code> | ||
+ | [[..:lib:erf|Beschreibung]]: | ||
+ | Liefert die Gaußsche Fehlerfunktion $\frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} dt$. | ||
+ | |||
+ | <code cpp> | ||
+ | double erfc (double x) | ||
+ | </code> | ||
+ | [[..:lib:erfc|Beschreibung]]: | ||
+ | Liefert das Komplement der Gaußschen Fehlerfunktion ''1-erf(x)'' = $\frac{2}{\sqrt{\pi}} \int_x^{\infty} e^{-t^2} dt$. | ||
+ | |||
+ | <code cpp> | ||
+ | double lgamma (double x) | ||
+ | </code> | ||
+ | [[..:lib:lgamma|Beschreibung]]: | ||
+ | Liefert den natürlichen Logarithmus vom Betrag der Gammafunktion $\ln | \Gamma(x) |$ für $x \neq -n$. | ||
+ | |||
+ | <code cpp> | ||
+ | double tgamma (double x) | ||
+ | </code> | ||
+ | [[..:lib:tgamma|Beschreibung]]: | ||
+ | Liefert den Wert der Gammafunktion $\Gamma(x) = \int_0^\infty t^{x-1}e^{-t} dt$ für $x \neq -n$. | ||
+ | |||
+ | ===== Spezielle Funktionen ===== | ||
+ | C++17 integriert den Standard [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3060.pdf|ISO/IEC 29124:2010]] "Extensions to the C++ library to support mathematical special functions" in die Mathematik-Bibliothek. | ||
+ | Bei diesen handelte es sich im Wesentlichen um Polynome und nicht geschlossen integrierbare Funktionen. | ||
+ | Die Bezeichnung "speziell" tragen diese "höheren" Funktionen nur aus historischen Gründen, | ||
+ | da sie einige wichtige Anwendungen in den Naturwissenschaften | ||
+ | als Lösungen spezieller Differentialgleichungen haben. | ||
+ | Das oben aufgeführte Gaußsche Fehlerintegral ''erf(x)'' und die Eulersche Gammafunktion $\Gamma(x)$ gehören aus mathematischer Sicht auch dazu, | ||
+ | befinden sich aber schon lange in ''<cmath>''. | ||
+ | <code cpp> | ||
+ | double riemann_zeta(double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:riemann_zeta|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Riemannsche_ζ-Funktion|Riemannschen Zeta-Funktion]] $\zeta(x) = \sum_{n=1}^{\infty} \frac{1}{n^x}$ für reelles ''x''. | ||
+ | |||
+ | ==== Integrale ==== | ||
+ | <code cpp> | ||
+ | double beta(double x, double y) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:beta|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Eulersche_Betafunktion|Eulerschen Betafunktion]] | ||
+ | $B(x,y) = \int_0^1 t^{x-1} (1-t)^{y-1} dt = \Gamma(x)\cdot\Gamma(y)/\Gamma(x+y)$. | ||
+ | |||
+ | <code cpp> | ||
+ | double expint(double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:expint|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Integralexponentialfunktion]] | ||
+ | $Ei(x) = -\int_{-x}^\infty \frac{e^{-t}}{t}dt$. | ||
+ | |||
+ | ==== Elliptische Integrale ==== | ||
+ | |||
+ | <code cpp> | ||
+ | double ellint_1(double k, double phi) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:ellint_1|Beschreibung]]: | ||
+ | Liefert Wert des unvollständigen [[wpde>Elliptisches_Integral|Elliptischen Integrals]] 1. Art | ||
+ | $F(k,\varphi) = \int_0^\varphi \frac{d\theta}{\sqrt{1-k^2 \sin^2 \theta}}$. | ||
+ | |||
+ | <code cpp> | ||
+ | double ellint_2(double k, double phi) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:ellint_2|Beschreibung]]: | ||
+ | Liefert Wert des unvollständigen [[wpde>Elliptisches_Integral|Elliptischen Integrals]] 2. Art | ||
+ | $E(k,\varphi) = \int_0^\varphi \sqrt{1-k^2 \sin^2 \theta}\, d\theta$. | ||
+ | |||
+ | <code cpp> | ||
+ | double ellint_3(double k, double nu, double phi) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:ellint_3|Beschreibung]]: | ||
+ | Liefert Wert des unvollständigen [[wpde>Elliptisches_Integral|Elliptischen Integrals]] 3. Art | ||
+ | $\Pi(k,\nu,\varphi) = \int_0^\varphi \frac{d\theta}{(1-\nu \sin^2 \theta)\sqrt{1-k^2 \sin^2 \theta}}$ | ||
+ | für $|k| \leq 1$ und $\nu > -1/\sin^2 \theta$. | ||
+ | |||
+ | <code cpp> | ||
+ | double comp_ellint_1(double k) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:comp_ellint_1|Beschreibung]]: | ||
+ | Liefert Wert des vollständigen [[wpde>Elliptisches_Integral|Elliptischen Integrals]] 1. Art | ||
+ | $K(k) = \int_0^{\pi/2} \frac{d\theta}{\sqrt{1-k^2 \sin^2 \theta}} = F(k,\pi/2)$. | ||
+ | |||
+ | <code cpp> | ||
+ | double comp_ellint_2(double k) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:comp_ellint_2|Beschreibung]]: | ||
+ | Liefert Wert des vollständigen [[wpde>Elliptisches_Integral|Elliptischen Integrals]] 2. Art | ||
+ | $E(k) = \int_0^{\pi/2} \sqrt{1-k^2 \sin^2 \theta}\, d\theta = E(k,\pi/2)$. | ||
+ | |||
+ | <code cpp> | ||
+ | double comp_ellint_3(double k, double nu) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:comp_ellint_3|Beschreibung]]: | ||
+ | Liefert Wert des vollständigen [[wpde>Elliptisches_Integral|Elliptischen Integrals]] 3. Art | ||
+ | $\Pi(k,\nu) = \int_0^{\pi/2} \frac{d\theta}{(1-\nu \sin^2 \theta)\sqrt{1-k^2 \sin^2 \theta}} = \Pi'(k,\nu,\pi/2)$. | ||
+ | |||
+ | ==== Zylinderfunktionen ==== | ||
+ | <code cpp> | ||
+ | double cyl_bessel_j(double nu, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:cyl_bessel_j|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Besselsche_Differentialgleichung|Bessel-Funktion]] 1. Art | ||
+ | $J_\nu(x) = \sum_{k=0}^\infty \frac{(-1)^k(x/2)^{\nu+2k}}{k! \Gamma(\nu+k+1)} = \frac{1}{\pi}\int_0^\pi \cos(x \sin \theta -\nu\theta) d\theta - \frac{\sin(\nu \pi)}{\pi} \int_0^\infty e^{-x \sinh t - \nu t} dt$ | ||
+ | für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double cyl_bessel_i(double nu, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:cyl_bessel_i|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Besselsche_Differentialgleichung|modifizierten Bessel-Funktion]] 1. Art | ||
+ | $I_\nu(x) = \sum_{k=0}^\infty \frac{(x/2)^{\nu+2k}}{k! \Gamma(\nu+k+1)} = \frac{1}{\pi}\int_0^\pi e^{x \cos \theta} \cos(\nu\theta) d\theta - \frac{\sin(\nu \pi)}{\pi} \int_0^\infty e^{-x \cosh t - \nu t} dt$ | ||
+ | für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double cyl_bessel_k(double nu, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:cyl_bessel_k|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Besselsche_Differentialgleichung|modifizierten Bessel-Funktion]] 2. Art | ||
+ | $K_\nu(x) = \int_0^\infty e^{-x \cosh t} \cosh (\nu t) dt = \frac{\pi}{2} \frac{I_{-\nu}(x)-I_\nu (x)}{\sin (\nu\pi)}$ | ||
+ | für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double cyl_neumann(double nu, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:cyl_neumann|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Besselsche_Differentialgleichung|Bessel-Funktion]] 2. Art (auch Weber- oder Neumann-Funktion) | ||
+ | $Y_\nu(x) = \frac{J_\nu(x)\cos(\nu\pi)-I_{-\nu} (x)}{\sin (\nu\pi)}$ bzw. $lim_{\nu\to n} Y_\nu(x)$ bei ganzzahligem $\nu$ | ||
+ | für $x \geq 0$. | ||
+ | |||
+ | |||
+ | |||
+ | ==== Kugelfunktionen ==== | ||
+ | |||
+ | <code cpp> | ||
+ | double sph_bessel(unsigned n, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:sph_bessel|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Besselsche_Differentialgleichung|sphärischen Bessel-Funktion]] (1. Art) | ||
+ | $j_\nu(x) = \sqrt{\frac{\pi}{2x}} J_{\nu+1/2}(x)$ | ||
+ | für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double sph_neumann(unsigned n, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:sph_neumann|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Besselsche_Differentialgleichung|sphärischen Bessel-Funktion]] 2. Art (oder sphärischen Neumann-Funktion) | ||
+ | $y_\nu(x) = \sqrt{\frac{\pi}{2x}} Y_{\nu+1/2}(x)$ | ||
+ | für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double sph_legendre(unsigned n, unsigned m, double theta) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:sph_legendre|Beschreibung]]: | ||
+ | Liefert Wert der [[wpde>Kugelflächenfunktion|]] | ||
+ | $Y_n^m(\theta,0) = (-1)^m \sqrt{\frac{(2n-1)(n-m)}{4\pi(n+m)!}} P_n^m(\cos \theta)$ für $0 \leq m \leq n$. | ||
+ | |||
+ | ==== Polynome ==== | ||
+ | |||
+ | <code cpp> | ||
+ | double hermite(unsigned n, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:hermite|Beschreibung]]: | ||
+ | Liefert Wert für das [[wpde>Hermitesches_Polynom|Hermitesche Polynom]] ''n''-ten Grades | ||
+ | $H_n(x) = (-1)^n e^{x^2} \frac{d^n}{dx^n} e^{-x^2}$. | ||
+ | |||
+ | <code cpp> | ||
+ | double laguerre(unsigned n, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:laguerre|Beschreibung]]: | ||
+ | Liefert Wert für das [[wpde>Laguerre-Polynom]] ''n''-ten Grades | ||
+ | $L_n(x) = \frac{e^x}{n!}\frac{d^n}{dx^n} (x^n e^{-x})$ für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double legendre(unsigned n, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:legendre|Beschreibung]]: | ||
+ | Liefert Wert für das [[wpde>Legendre-Polynom]] ''n''-ten Grades | ||
+ | $P_n(x) = \frac{1}{2^n n!}\frac{d^n}{dx^n} (x^2-1)^n$ für $|x| \leq 1$. | ||
+ | |||
+ | <code cpp> | ||
+ | double assoc_laguerre(unsigned n, unsigned m, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:assoc_laguerre|Beschreibung]]: | ||
+ | Liefert Wert für das [[wpde>Zugeordnete_Laguerre-Polynome|zugeordnete Laguerre-Polynom]] | ||
+ | $L_n^m (x) = (-1)^m \frac{d^m}{dx^m} L_{n+m}(x)$ mit $0 \leq m \leq n$ für $x \geq 0$. | ||
+ | |||
+ | <code cpp> | ||
+ | double assoc_legendre(unsigned n, unsigned m, double x) // C++17 | ||
+ | </code> | ||
+ | [[..:lib:assoc_legendre|Beschreibung]]: | ||
+ | Liefert Wert für das [[wpde>Zugeordnete_Legendre-Polynome|zugeordnete Legendre-Polynom]] | ||
+ | (genauer: die zugeordnete Kugelfunktion) | ||
+ | $P_n^m(x) = (-1)^m (1-x^2)^{m/2}\frac{d^m}{dx^m} P_n(x)$ mit $0 \leq m \leq n$ und $|x| \leq 1$. | ||
+ | |||
+ | |||
+ | ===== Siehe auch ===== | ||
+ | [[complex|komplexe Zahlen]]. | ||