.\" -*- coding: UTF-8 -*- '\" t .\" Copyright 2001, Andries E. Brouwer .\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH rint 3 "8 Febrero 2026" "Linux man\-pages 6.18" .SH NOMBRE nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl \- redondean al entero más cercano .SH BIBLIOTECA Biblioteca Matemática (\fIlibm\fP,\ \fI\-lm\fP) .SH SINOPSIS .nf \fB#include \fP .P \fBdouble nearbyint(double \fP\fIx\fP\fB);\fP \fBfloat nearbyintf(float \fP\fIx\fP\fB);\fP \fBlong double nearbyintl(long double \fP\fIx\fP\fB);\fP .P \fBdouble rint(double \fP\fIx\fP\fB);\fP \fBfloat rintf(float \fP\fIx\fP\fB);\fP \fBlong double rintl(long double \fP\fIx\fP\fB);\fP .fi .P .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .P \fBnearbyint\fP(), \fBnearbyintf\fP(), \fBnearbyintl\fP(): .nf _POSIX_C_SOURCE >= 200112L || _ISOC99_SOURCE .fi .P \fBrint\fP(): .nf .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 500 || /* Desde glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi .P \fBrintf\fP(), \fBrintl\fP(): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* Desde glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE .fi .SH DESCRIPCIÓN Las funciones \fBnearbyint\fP(), \fBnearbyintf\fP() y \fBnearbyintl\fP() redondean su argumento a un valor entero en formato de coma flotante, utilizando la dirección de redondeo actual (véase \fBfesetround\fP(3)) y sin generar la excepción \fIinexact\fP. Cuando la dirección de redondeo actual es al entero más cercano, estas funciones redondean los casos intermedios al entero par de acuerdo con la norma IEEE\-754. .P Las funciones \fBrint\fP(), \fBrintf\fP() y \fBrintl\fP() hacen lo mismo, pero generarán la excepción \fIinexact\fP (\fBFE_INEXACT\fP. Se puede comprobar mediante \fBfetestexcept\fP(3)) cuando el valor del resultado difiere del del argumento. .SH "VALOR DEVUELTO" Estas funciones devuelven el valor del entero redondeado. .P Si \fIx\fP es entero, +0, \-0, NaN o infinito, se devuelve \fIx\fP tal cual. .SH ERRORES No suceden errores. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBnearbyint\fP(), \fBnearbyintf\fP(), \fBnearbyintl\fP(), \fBrint\fP(), \fBrintf\fP(), \fBrintl\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .SH ESTÁNDARES C11, POSIX.1\-2008. .SH HISTORIAL C99, POSIX.1\-2001. .P SUSv2 y POSIX.1\-2001 contienen información sobre desbordamiento (que podría establecer \fIerrno\fP en \fBERANGE\fP o generar una excepción \fBFE_OVERFLOW\fP). En la práctica, el resultado no puede desbordarse en ningún equipo actual, por lo que esta gestión de errores carecía de sentido. Concretamente, el desbordamiento solo puede ocurrir cuando el valor máximo del exponente es menor que el número de bits de la mantisa. Para los números de coma flotante de 32 y 64 bits del estándar IEEE\-754, el valor máximo del exponente es 127 (1023, respectivamente), y el número de bits de la mantisa, incluyendo el bit implícito, es 24 (53, respectivamente). Esto se eliminó en POSIX.1\-2008. .P Si se desea almacenar el valor redondeado en un tipo entero, probablemente sea mejor usar una de las funciones descritas en \fBlrint\fP(3). .SH "VÉASE TAMBIÉN" \fBceil\fP(3), \fBfloor\fP(3), \fBlrint\fP(3), \fBround\fP(3), \fBtrunc\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .