.\" -*- coding: UTF-8 -*- '\" t .\" Copyright 2001 Andries Brouwer . .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH round 3 "20 julho 2023" "Linux man\-pages 6.05.01" .SH NOME round, roundf, roundl \- arredonda para o número inteiro mais próximo, distante de zero .SH BIBLIOTECA Biblioteca matemática (\fIlibm\fP, \fI\-lm\fP) .SH SINOPSE .nf \fB#include \fP .PP \fBdouble round(double \fP\fIx\fP\fB);\fP \fBfloat roundf(float \fP\fIx\fP\fB);\fP \fBlong double roundl(long double \fP\fIx\fP\fB);\fP .fi .PP .RS -4 Requisitos de macro de teste de recursos para o glibc (consulte \fBfeature_test_macros\fP(7)): .RE .PP \fBround\fP(), \fBroundf\fP(), \fBroundl\fP(): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L .fi .SH DESCRIÇÃO Estas funções arredondam \fIx\fP para o número inteiro mais próximo, mas parcialmente casos distantes de zero (independente da direção de arredondamento atual, veja \fBfenv\fP(3)), ao invés de arredondar para o número inteiro par como \fBrint\fP(3). .PP Por exemplo, \fIround(0.5)\fP é 1.0 e \fIround(\-0.5)\fP é \-1.0. .SH "VALOR DE RETORNO" Estas funções retornar um valor inteiro arredondado. .PP Se \fIx\fP é integral, +0, \-0, NaN ou infinito, o próprio \fIx\fP é retornado. .SH ERROS Ocorre nenhum erro. POSIX.1\-2001 documenta um erro de intervalo para estouros, mas consulte NOTAS. .SH ATRIBUTOS Para uma explicação dos termos usados nesta seção, consulte \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interface Atributo Valor T{ .na .nh \fBround\fP(), \fBroundf\fP(), \fBroundl\fP() T} Thread safety MT\-Safe .TE .sp 1 .SH PADRÕES C11, POSIX.1\-2008. .SH HISTÓRICO glibc 2.1. C99, POSIX.1\-2001. .SH NOTAS .\" The POSIX.1-2001 APPLICATION USAGE SECTION discusses this point. POSIX.1\-2001 contains text about overflow (which might set \fIerrno\fP to \fBERANGE\fP, or raise an \fBFE_OVERFLOW\fP exception). In practice, the result cannot overflow on any current machine, so this error\-handling stuff is just nonsense. (More precisely, overflow can happen only when the maximum value of the exponent is smaller than the number of mantissa bits. For the IEEE\-754 standard 32\-bit and 64\-bit floating\-point numbers the maximum value of the exponent is 127 (respectively, 1023), and the number of mantissa bits including the implicit bit is 24 (respectively, 53).) .PP Se você deseja armazenar o valor arredondado em um tipo inteiro, provavelmente deseja usar uma das funções descritas em \fBlround\fP(3). .SH "VEJA TAMBÉM" \fBceil\fP(3), \fBfloor\fP(3), \fBlround\fP(3), \fBnearbyint\fP(3), \fBrint\fP(3), \fBtrunc\fP(3) .PP .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por Mila , André Luiz Fassone e Rafael Fontenelle . . .PP Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. .PP Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@lists.debian.org a lista de discussão de tradutores .ME .