ROUND(3) BSD Library Functions Manual ROUND(3)NAME
round, roundf, roundl -- round to nearest integral value
Math Library (libm, -lm)
roundl(long double x);
The round(), roundf(), and roundl() functions return the nearest integral value to x; if x lies halfway between two integral values, then
these functions return the integral value with the larger absolute value (i.e., they round away from zero).
SEE ALSO ceil(3), floor(3), ieee(3), lrint(3), lround(3), math(3), rint(3), trunc(3)STANDARDS
These functions conform to ISO/IEC 9899:1999 (``ISO C99'').
The round() and roundf() functions appeared in FreeBSD 5.3. The roundl() function appeared in FreeBSD 6.0.
BSD April 7, 2005 BSD
i'm a newbie here, i need help with a shell script.
for a given number, if it is greater than ten round to the nearest 10
same for 100, if it is greater than 100 round to the nearest 100, and same for 1000.
i'm confused how to start this...
its supposed to look like this
input ... (11 Replies)
i have a file in which 3 values are stored like --4.72 4.42 3.86
what i wanna do is that take read each value and compare with a fixed value say 5 but cant do so as i am getting an error for the same.
please check the code
cat /home/nsadm/auto/Logging/uptime.txt| while read a b c
if... (2 Replies)
Hey everyone, I was wondering if i am able to write a sed command to round a number to two decimal places. So for example:
I just want to chop off the numbers to the right of the second digit after the period. I know this is probably trivial but the closest i got was... (8 Replies)
Hi all of you,
Would be great if you help me with how to round up to whole number from my input values like
o/p should be like 3,2,3,-2,-3
thnks in adv!!!!
regards (3 Replies)