.\" -*- coding: UTF-8 -*- .\" Copyright 2001 Andries Brouwer . .\" 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 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH RINT 3 "15. März 2016" "" Linux\-Programmierhandbuch .SH BEZEICHNUNG nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl \- auf die nächste Ganzzahl runden .SH ÜBERSICHT .nf \fB#include \fP .sp \fBdouble nearbyint(double \fP\fIx\fP\fB);\fP .br \fBfloat nearbyintf(float \fP\fIx\fP\fB);\fP .br \fBlong double nearbyintl(long double \fP\fIx\fP\fB);\fP .sp \fBdouble rint(double \fP\fIx\fP\fB);\fP .br \fBfloat rintf(float \fP\fIx\fP\fB);\fP .br \fBlong double rintl(long double \fP\fIx\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 \fBnearbyint\fP(), \fBnearbyintf\fP(), \fBnearbyintl\fP(): .RS 4 _POSIX_C_SOURCE\ >=\ 200112L || _ISOC99_SOURCE .RE .br \fBrint\fP(): .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L || _XOPEN_SOURCE\ >=\ 500 || /* Seit Glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc\-Versionen <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .RE .br \fBrintf\fP(), \fBrintl\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 b .SH BESCHREIBUNG Die Funktionen \fBnearbyint\fP(), \fBnearbyintf\fP() und \fBnearbyintl\fP() runden ihre Argumente auf einen ganzzahligen Wert im Fließkommaformat. Dazu benutzen sie die aktuelle Rundungsrichtung (siehe \fBfesetround\fP(3)) und lösen keine \fIinexact\fP\-Ausnahme aus. Falls die aktuelle Rundungsrichtung auf das Nächste abzielt, runden diese Funktionen, wenn der Wert in der Mitte liegt, gemäß IEEE\-754 auf eine gerade Ganzzahl. .LP Die Funktionen \fBrint\fP(), \fBrintf\fP() und \fBrintl\fP() tun das gleiche, lösen aber eine \fIinexact\fP\-Ausnahme aus (\fBFE_INEXACT\fP, mittels \fBfetestexcept\fP(3) prüfbar), wenn sich das Ergebnis im Wert vom Argument unterscheidet. .SH RÜCKGABEWERT Diese Funktionen liefern den gerundeten ganzzahligen Wert zurück. Falls \fIx\fP ganzzahlig, +0, \-0, NaN (keine Zahl) oder unendlich ist, wird \fIx\fP selbst zurückgegeben. .SH FEHLER Es treten keine Fehler auf. POSIX.1\-2001 dokumentiert für Überläufe einen Bereichsfehler, aber lesen Sie dazu die ANMERKUNGEN. .SH ATTRIBUTE Siehe \fBattributes\fP(7) für eine Erläuterung der in diesem Abschnitt verwandten Ausdrücke. .TS allbox; lbw26 lb lb l l l. Schnittstelle Attribut Wert T{ \fBnearbyint\fP(), \fBnearbyintf\fP(), .br \fBnearbyintl\fP(), \fBrint\fP(), .br \fBrintf\fP(), \fBrintl\fP() T} Multithread\-Fähigkeit MT\-Safe .TE .SH "KONFORM ZU" C99, POSIX.1\-2001, POSIX.1\-2008. .SH ANMERKUNGEN SUSv2 und POSIX.1\-2001 enthalten Text über Überläufe (die \fIerrno\fP auf \fBERANGE\fP setzen oder eine \fBFE_OVERFLOW\fP\-Ausnahme auslösen können). In der Praxis kann das Ergebnis auf einer tatsächlichen Maschine nicht überlaufen, da dieses Fehlerbehandlungszeug purer Unsinn ist. (Genaugenommen kann ein Überlauf nur auftreten, wenn der maximale Wert der Exponenten kleiner ist als die der Mantissen\-Bits. Für die IEEE\-754\-Standard\-32\- und 64\-Bit\-Fließkommazahlen ist der Maximalwert für den Exponenten 128 (beziehungsweise 1024) und die Anzahl der Mantissen\-Bits 24 (beziehungsweise 53).) Wenn Sie den gerundeten Wert in einem ganzzahligen Typ speichern möchten, wollen Sie stattdessen wahrscheinlich eine der in \fBlrint\fP(3) beschriebenen Funktionen benutzen. .SH "SIEHE AUCH" \fBceil\fP(3), \fBfloor\fP(3), \fBlrint\fP(3), \fBround\fP(3), \fBtrunc\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 Markus Schmitt und Chris Leick 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 .