Provided by: manpages-es-dev_4.15.0-9_all
NOMBRE
trunc, truncf, truncl - redondeo a entero, hacia cero
SINOPSIS
#include <math.h> double trunc(double x); float truncf(float x); long double truncl(long double x); Enlazar con -lm. Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)): trunc(), truncf(), truncl(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
DESCRIPCIÓN
These functions round x to the nearest integer value that is not larger in magnitude than x.
VALOR DEVUELTO
These functions return the rounded integer value, in floating format. Si x es entero, infinito o NaN, se devuelve x tal cual.
ERRORES
No errors occur.
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 │ ├────────────────────────────────────────────────┼────────────────────┼───────────────────┤ │trunc(), truncf(), truncl() │ Seguridad del hilo │ Multi-hilo seguro │ └────────────────────────────────────────────────┴────────────────────┴───────────────────┘
CONFORME A
C99, POSIX.1-2001, POSIX.1-2008.
NOTAS
The integral value returned by these functions may be too large to store in an integer type (int, long, etc.). To avoid an overflow, which will produce undefined results, an application should perform a range check on the returned value before assigning it to an integer type.
VÉASE TAMBIÉN
ceil(3), floor(3), lrint(3), nearbyint(3), rint(3), round(3)
COLOFÓN
Esta página es parte de la versión 5.13 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> Esta traducción es documentación libre; lea la GNU General Public License Version 3 ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ 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⟩. 22 Marzo 2021 TRUNC(3)