United States-English |
|
|
HP-UX Reference > Lllround(3M)HP-UX 11i Version 3: February 2007 |
|
NAMEllround(), llroundf(), llroundl(), llroundw(), llroundq() — round to long long functions DESCRIPTIONllround() rounds its argument to the nearest integral value. An argument exactly halfway between two integers is rounded away from zero, regardless of the current rounding direction. Rounding away from zero also applies to the functions, round and lround. llround() is equivalent to lround(), except that it rounds to long long instead of long int. Integrity Server Onlyllroundf() is a float version of llround(); it takes a float argument. llroundl() is a long double version of llround(); it takes a long double argument. llroundw() is an extended version of llround(); it takes an extended argument. llroundq() is equivalent to llroundl() on HP-UX systems. USAGETo use these functions, compile either with the default -Ae option or with the -Aa and -D_HPUX_SOURCE options. To use (for Integrity servers) llroundw() or llroundq(), compile also with the -fpwidetypes option. Make sure your program includes <math.h>. Link in the math library by specifying -lm on the compiler or linker command line. For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site: http://www.hp.com/go/fp. RETURN VALUEIf the rounded value is outside the range of long long, the numeric result is the maximum or minimum long long value and the invalid floating-point exception is raised. On Integrity servers, if the rounded value is outside the range of long long, the numeric result is the minimum long long value. When llround() raises no other floating-point exception and the result differs from the argument, the function may raise the inexact floating-point exception. SEE ALSOceil(3M), floor(3M), fabs(3M), fmod(3M), fegetround(3M), fesetround(3M), lrint(3M), llrint(3M), lround(3M), rint(3M), round(3M), trunc(3M), math(5), fenv(5). |
Printable version | ||
|