Provided by: manpages-pt-br-dev_4.18.1-1_all bug

NOME

       ceil, ceilf, ceill - funções de 'teto': menor valor inteiro maior ou igual que x

BIBLIOTECA

       Biblioteca matemática (libm, -lm)

SINOPSE

       #include <math.h>

       double ceil(double x);
       float ceilf(float x);
       long double ceill(long double x);

   Requisitos de macro de teste de recursos para o glibc (consulte feature_test_macros(7)):

       ceilf(), ceill():
           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
               || /* Desde o glibc 2.19: */ _DEFAULT_SOURCE
               || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIÇÃO

       Estas funções retornam o menor valor integral que não é menor que x.

       Por exemplo, ceil(0.5) é 1.0 e ceil(-0.5) é 0.0.

VALOR DE RETORNO

       Estas funções retornam o teto de x.

       Se x é integral, +0, -0, NaN ou infinito, o próprio x é retornado.

ERROS

       Ocorre  nenhum  erro.  POSIX.1-2001  documenta  um  erro  de  intervalo para estouros, mas
       consulte NOTAS.

ATRIBUTOS

       Para uma explicação dos termos usados nesta seção, consulte attributes(7).

       ┌───────────────────────────────────────────────────────────────┬───────────────┬─────────┐
       │InterfaceAtributoValor   │
       ├───────────────────────────────────────────────────────────────┼───────────────┼─────────┤
       │ceil(), ceilf(), ceill()                                       │ Thread safety │ MT-Safe │
       └───────────────────────────────────────────────────────────────┴───────────────┴─────────┘

PADRÕES

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

       A variante retornando double também está em conformidade com SVr4, 4.3BSD.

NOTAS

       SUSv2 and POSIX.1-2001 contain text about overflow (which might set errno  to  ERANGE,  or
       raise  an  FE_OVERFLOW 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).)

       O valor integral retornado por essas funções pode ser muito grande para  armazenar  em  um
       tipo  inteiro  (int,  long  etc.).  Para  evitar  um  estouro,  que  produzirá  resultados
       indefinidos, um aplicativo deve executar uma verificação de intervalo no  valor  retornado
       antes de atribuí-lo a um tipo inteiro.

VEJA TAMBÉM

       floor(3), lrint(3), nearbyint(3), rint(3), round(3), trunc(3)

TRADUÇÃO

       A  tradução  para  português brasileiro desta página man foi criada por Paulo César Mendes
       <drpc@ism.com.br>,  André  Luiz  Fassone  <lonely_wolf@ig.com.br>  e   Rafael   Fontenelle
       <rafaelff@gnome.org>.

       Esta  tradução  é  uma  documentação  livre;  leia  a  Licença  Pública Geral GNU Versão 3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ ou posterior para  as  condições  de  direitos
       autorais.  Nenhuma responsabilidade é aceita.

       Se  você  encontrar  algum erro na tradução desta página de manual, envie um e-mail para a
       lista de discussão de tradutores ⟨debian-l10n-portuguese@lists.debian.org⟩.