.\" -*- coding: UTF-8 -*- .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 1995-08-14 by Arnt Gulbrandsen .\" Modified 2002-07-27 by Walter Harms .\" (walter.harms@informatik.uni-oldenburg.de) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH POW 3 "15. März 2016" "" Linux\-Programmierhandbuch .SH BEZEICHNUNG pow, powf, powl \- Potenzfunktionen .SH ÜBERSICHT .nf \fB#include \fP .sp \fBdouble pow(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP .br \fBfloat powf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP .br \fBlong double powl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP .fi .sp Linken Sie mit der Option \fI\-lm\fP. .sp .in -4n Mit Glibc erforderliche Makros (siehe \fBfeature_test_macros\fP(7)): .in .sp .ad l \fBpowf\fP(), \fBpowl\fP(): .RS 4 _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L || /* Seit Glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc\-Versionen <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .RE .ad .SH BESCHREIBUNG Diese Funktionen geben die \fIy\fP\-te Potenz von \fIx\fP zurück. .SH RÜCKGABEWERT Bei erfolgreicher Ausführung geben diese Funktionen die \fIy\fP\-te Potenz von \fIx\fP zurück. .\" The domain error is generated at least as far back as glibc 2.4 Falls \fIx\fP ein endlicher Wert kleiner 0 und \fIy\fP endlich und keine ganze Zahl (Integer) ist, tritt ein Eingabe\-Bereichsfehler (»domain error«) auf und es wird ein NaN zurückgegeben. .\" The range error is generated at least as far back as glibc 2.4 Bei einem Überlauf des Ergebnisses tritt ein Ergebnis\-Bereichsfehler ein; die Funktionen geben entsprechend \fBHUGE_VAL\fP, \fBHUGE_VALF\fP oder \fBHUGE_VALL\fP mit dem mathematisch richtigen Vorzeichen zurück. .\" POSIX.1 does not specify the sign of the zero, .\" but http://sources.redhat.com/bugzilla/show_bug.cgi?id=2678 .\" points out that the zero has the wrong sign in some cases. Wenn im Ergebnis eine Bereichsunterschreitung auftritt und das Ergebnis nicht darstellbar ist, tritt ein Ergebnis\-Bereichsfehler ein. In diesem Fall ist der Rückgabewert 0. Mit Ausnahme der im Folgenden beschriebenen Fälle ist das Ergebnis ein »NaN«, wenn \fIx\fP oder \fIy\fP ein »NaN« ist. Wenn \fIx\fP den Wert +1 hat, dann ist das Ergebnis 1.0 (sogar wenn \fIy\fP ein »NaN« ist). Wenn \fIy\fP den Wert 0 hat, dann ist das Ergebnis 1.0 (sogar wenn \fIx\fP ein »NaN« ist). Wenn \fIx\fP gleich +0 (\-0) und \fIy\fP eine ungerade ganze Zahl größer als 0 ist, ist das Ergebnis +0 (\-0). Wenn \fIx\fP gleich 0 und \fIy\fP größer als 0 und keine ungerade ganze Zahl ist, ist das Ergebnis +0. Wenn \fIx\fP gleich \-1 und \fIy\fP positiv unendlich oder negativ unendlich ist, ist das Ergebnis 1.0. Wenn der Absolutwert von \fIx\fP kleiner als 1 ist und \fIy\fP negativ unendlich ist, ist das Ergebnis positiv unendlich. Wenn der Absolutwert von \fIx\fP größer als 1 und \fIy\fP negativ unendlich ist, ist das Ergebnis +0. Wenn der Absolutwert von \fIx\fP kleiner als 1 und \fIy\fP positiv unendlich ist, ist das Ergebnis +0. Wenn der Absolutwert von \fIx\fP größer als 1 und \fIy\fP positiv unendlich ist, ist das Ergebnis positiv unendlich. Wenn \fIx\fP negativ unendlich und \fIy\fP eine ungerade ganze Zahl (Integer) kleiner 0 ist, ist das Ergebnis \-0. Wenn \fIx\fP negativ unendlich und \fIy\fP keine ungerade ganze Zahl kleiner 0 ist, ist das Ergebnis +0. Wenn \fIx\fP negativ unendlich und \fIy\fP eine ungerade ganze Zahl größer 0 ist, ist das Ergebnis negativ unendlich. Wenn \fIx\fP negativ unendlich und \fIy\fP größer als 0 und keine ungerade ganze Zahl ist, ist das Ergebnis positiv unendlich. Wenn \fIx\fP positiv unendlich und \fIy\fP kleiner als 0 ist, ist das Ergebnis +0. Wenn \fIx\fP positiv unendlich und \fIy\fP größer als Null ist, ist das Ergebnis positiv unendlich. Wenn \fIx\fP gleich +0 oder \-0 und \fIy\fP eine ungerade ganze Zahl kleiner als 0 ist, tritt ein Polfehler ein. Der Rückgabewert ist dann \fBHUGE_VAL\fP, \fBHUGE_VALF\fP oder \fBHUGE_VALL\fP mit dem Vorzeichen von \fIx\fP. .\" The pole error is generated at least as far back as glibc 2.4 Wenn \fIx\fP gleich +0 oder \-0 ist und \fIy\fP kleiner als 0 und keine ungerade ganze Zahl ist, tritt ein Polfehler ein. Der Rückgabewert ist dann \fBHUGE_VAL\fP, \fBHUGE_VALF\fP oder \fBHUGE_VALL\fP. .SH FEHLER .\" FIXME . review status of this error .\" longstanding bug report for glibc: .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=369 .\" For negative x, and -large and +large y, glibc 2.8 gives incorrect .\" results .\" pow(-0.5,-DBL_MAX)=nan .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result; .\" FAIL (expected: range-error-overflow (ERANGE, FE_OVERFLOW); +INF) .\" .\" pow(-1.5,-DBL_MAX)=nan .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result; .\" FAIL (expected: range-error-underflow (ERANGE, FE_UNDERFLOW); +0) .\" .\" pow(-0.5,DBL_MAX)=nan .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result; .\" FAIL (expected: range-error-underflow (ERANGE, FE_UNDERFLOW); +0) .\" .\" pow(-1.5,DBL_MAX)=nan .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result; .\" FAIL (expected: range-error-overflow (ERANGE, FE_OVERFLOW); +INF) In \fBmath_error\fP(7) erfahren Sie, wie Sie Fehler bei der Ausführung mathematischer Funktionen erkennen. .PP Die folgenden Fehler können auftreten: .TP Eingabe\-Bereichsfehler: \fIx\fP ist negativ und \fIy\fP ist eine endliche, nicht ganze Zahl (noninteger). \fIerrno\fP wird auf \fBEDOM\fP gesetzt. Es wird der Fließkomma\-Ausnahmefehler »unzulässige Fließkommazahl« (\fBFE_INVALID\fP) ausgelöst. .TP Polfehler: \fIx\fP ist 0 und \fIy\fP ist negativ. \fIerrno\fP wird auf \fBERANGE\fP gesetzt (siehe aber FEHLER). Es wird der Fließkomma\-Ausnahmefehler »Division durch Null« (\fBFE_DIVBYZERO\fP) ausgelöst. .TP Ergebnis\-Bereichsfehler: Überlauf \fIerrno\fP wird auf \fBERANGE\fP gesetzt. Es wird der Fließkomma\-Ausnahmefehler »Überlauf« (\fBFE_OVERFLOW\fP) ausgelöst. .TP Ergebnis\-Bereichsfehler: Unterschreitung \fIerrno\fP wird auf \fBERANGE\fP gesetzt. Es wird der Fließkomma\-Ausnahmefehler »Unterschreitung« (\fBFE_UNDERFLOW\fP) ausgelöst. .SH ATTRIBUTE Siehe \fBattributes\fP(7) für eine Erläuterung der in diesem Abschnitt verwandten Ausdrücke. .TS allbox; lbw21 lb lb l l l. Schnittstelle Attribut Wert T{ \fBpow\fP(), \fBpowf\fP(), \fBpowl\fP() T} Multithread\-Fähigkeit MT\-Safe .TE .SH "KONFORM ZU" C99, POSIX.1\-2001, POSIX.1\-2008. Die Variante, die \fIdouble\fP zurückgibt, ist außerdem konform zu SVr4, 4.3BSD, C89. .SH FEHLER .\" .\" https://sourceware.org/bugzilla/show_bug.cgi?id=13932 Auf 64\-Bit kann \fBpow\fP() für bestimmte (seltene) Eingaben mehr als 10.000\-fach langsamer als bei nahe beiliegenden Eingaben sein. Dies betrifft nur \fBpow\fP() und nicht \fBpowf\fP() oder \fBpowl\fP(). .\" .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6776 .\" or possibly 2.9, I haven't found the source code change .\" and I don't have a 2.9 system to test Bis Version 2.9 der Glibc wird beim Eintreten eines Polfehlers \fIerrno\fP auf \fBEDOM\fP gesetzt und nicht auf \fBERANGE\fP, wie es POSIX fordert. Seit Version 2.10 verhält sich Glibc korrekt. .\" see bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=3866 .\" and http://sources.redhat.com/bugzilla/show_bug.cgi?id=369 Wenn \fIx\fP negativ ist, bewirken große negative oder positive \fIy\fP\-Werte als Ergebnis der Funktion ein NaN, setzen \fIerrno\fP auf \fBEDOM\fP und lösen den Fließkomma\-Ausnahmefehler \fBFE_INVALID\fP aus. Dieses Verhalten ist mit \fBpow\fP() zu beobachten, wenn der Absolutwert von \fIy\fP größer als etwa 9.223373e18 ist. .\" FIXME . Actually, 2.3.2 is the earliest test result I have; so yet .\" to confirm if this error occurs only in 2.3.2. Bis einschließlich Version 2.3.2: wenn ein Überlauf oder Unterlauf auftritt, erzeugt die Glibc\-Version von \fBpow\fP() einen zusätzlichen (ungültige) Fließkomma\-Ausnahmefehler (\fBFE_INVALID\fP). .SH "SIEHE AUCH" \fBcbrt\fP(3), \fBcpow\fP(3), \fBsqrt\fP(3) .SH KOLOPHON Diese Seite ist Teil der Veröffentlichung 4.09 des Projekts Linux\-\fIman\-pages\fP. Eine Beschreibung des Projekts, Informationen, wie Fehler gemeldet werden können sowie die aktuelle Version dieser Seite finden sich unter \%https://www.kernel.org/doc/man\-pages/. .SH ÜBERSETZUNG Die deutsche Übersetzung dieser Handbuchseite wurde von Maik Messerschmidt und Martin Eberhard Schauer erstellt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die GNU General Public License Version 3 oder neuer bezüglich der Copyright-Bedingungen. Es wird KEINE HAFTUNG übernommen. Wenn Sie Fehler in der Übersetzung dieser Handbuchseite finden, schicken Sie bitte eine E-Mail an .