std::rint, std::lrint, std::llrint
Template:cpp/numeric/math/sidebar Template:ddcl list begin <tr class="t-dsc-header">
<td><cmath>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td ><td class="t-dcl-nopad"> </td> <td > (since C++11) </td> </tr> Template:ddcl list end
Rounds the floating-point argument arg
to an integer value in floating-point format, using the current rounding mode. If the result differs from arg
(i.e., arg
was not an integer value already), the floating-point exception FE_INEXACT is raised.
Contents |
Parameters
arg | - | floating point value |
Return value
The integer result of rounding arg
Notes
The only difference between Template:cpp and Template:cpp is that Template:cpp may raise the Template:cpp floating-point exception, while Template:cpp never raises it.