std::ceil
De cppreference.com
[] |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Dclar dans l'en-tte <cmath>
|
||
float ceil( float arg ); |
||
double ceil( double arg ); |
||
long double ceil( long double arg ); |
||
double ceil( Integral arg ); |
(depuis C++11) | |
Entier le plus proche calcule pas moins de
arg . Original:
Computes nearest integer not less than
arg. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Paramtres
| arg | - | valeur du point flottant
Original: floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
Le plus proche entier suprieur ou gal
argOriginal:
Nearest integer not less than
argThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[[Image:
Retourne la valeur
|200x200px]]Original:
{{{2}}}
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Argument
Notes
Si l'argument est infini (positif ou ngatif) ou zro (positif ou ngatif), la valeur de retour est le mme que l'argument .
Original:
If the argument is infinity (positive or negative) or zero (positive or negative), the return value is the same as the argument.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Reprsentable le plus lev valeurs virgule flottante sont des nombres entiers exacts dans tous les standards des formats virgule flottante, de sorte que cette fonction ne jamais dbordements .
Original:
The largest representable floating-point values are exact integers in all standard floating-point formats, so this function never overflows.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Cette fonction peut, mais n'est pas tenu de, lever FE_INEXACT exceptions de virgule flottante pour les arguments non entiers .
Original:
This function may, but is not required to, raise FE_INEXACT floating-point exceptions for non-integer arguments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Exemple
#include <cmath>
#include <iostream>
int main()
{
double a = 12.0;
std::cout << std::fixed;
std::cout << std::ceil(12.0) << '\n';
std::cout << std::ceil(12.1) << '\n';
std::cout << std::ceil(12.5) << '\n';
std::cout << std::ceil(12.9) << '\n';
std::cout << std::ceil(13.0) << '\n';}
Rsultat :
12.000000
13.000000
13.000000
13.000000
13.000000
Voir aussi
entier le plus proche n'est pas suprieure la valeur donne Original: nearest integer not greater than the given value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
(C++11) |
entier le plus proche n'est pas suprieure en grandeur la valeur donne Original: nearest integer not greater in magnitude than the given value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
(C++11) (C++11) (C++11) |
entier le plus proche, arrondi en s'loignant de zro dans les cas de transition Original: nearest integer, rounding away from zero in halfway cases The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
(C++11) (C++11) (C++11) |
entier le plus proche en utilisant le mode d'arrondi courant l'exception si le rsultat est diffrent Original: nearest integer using current rounding mode with exception if the result differs The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
(C++11) |
entier le plus proche en utilisant le mode d'arrondi courant Original: nearest integer using current rounding mode The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |