Scroll to navigation

LRINT(3) Manual del Programador de Linux LRINT(3)

NOMBRE

lrint, lrintf, lrintl, llrint, llrintf, llrintl - redondean al entero más cercano

SINOPSIS

#include <math.h>
long lrint(double x);
long lrintf(float x);
long lrintl(long double x);
long long llrint(double x);
long long llrintf(float x);
long long llrintl(long double x);

Enlazar con -lm.

Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)):

A continuación se muestran todas las funciones:

_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L

DESCRIPCIÓN

These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)).

Note that unlike the rint(3) family of functions, the return type of these functions differs from that of their arguments.

VALOR DEVUELTO

Estas funciones devuelven el valor del entero redondeado.

If x is a NaN or an infinity, or the rounded value is too large to be stored in a long (long long in the case of the ll* functions), then a domain error occurs, and the return value is unspecified.

ERRORES

Consulte math_error(7) para saber cómo es posible conocer si se ha producido algún error al invocar estas funciones.

Puede ocurrir los siguientes errores

An invalid floating-point exception (FE_INVALID) is raised.

Estas funciones no definen errno.

VERSIONES

These functions first appeared in glibc in version 2.1.

ATRIBUTOS

Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

Interfaz Atributo Valor
lrint(), lrintf(), lrintl(), llrint(), llrintf(), llrintl() Seguridad del hilo Multi-hilo seguro

CONFORME A

C99, POSIX.1-2001, POSIX.1-2008.

VÉASE TAMBIÉN

ceil(3), floor(3), lround(3), nearbyint(3), rint(3), round(3)

COLOFÓN

Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars <mpi79470@alu.um.es> y Marcos Fouces <marcos@debian.org>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

1 Noviembre 2020