round(3M) Mathematical Library Functions round(3M)NAME
round, roundf, roundl - round to nearest integer value in floating-point format
SYNOPSIS
c99 [ flag... ] file... -lm [ library... ]
#include <math.h>
double round(double x);
float roundf(float x);
long double roundl(long double x);
DESCRIPTION
These functions round their argument to the nearest integer value in floating-point format, rounding halfway cases away from 0, regardless
of the current rounding direction.
RETURN VALUES
Upon successful completion, these functions return the rounded integer value.
If x is NaN, a NaN is returned.
If x is +-0 or +- Inf, x is returned.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO feclearexcept(3M), fetestexcept(3M), math.h(3HEAD), attributes(5), standards(5)SunOS 5.11 12 Jul 2006 round(3M)
Check Out this Related Man Page
round(3M) Mathematical Library Functions round(3M)NAME
round, roundf, roundl - round to nearest integer value in floating-point format
SYNOPSIS
cc [ flag... ] file... -lm [ library... ]
#include <math.h>
double round(double x);
float roundf(float x);
long double roundl(long double x);
DESCRIPTION
These functions round their argument to the nearest integer value in floating-point format, rounding halfway cases away from 0, regardless
of the current rounding direction.
RETURN VALUES
Upon successful completion, these functions return the rounded integer value.
If x is NaN, a NaN is returned.
If x is +-0 or +- Inf, x is returned.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO feclearexcept(3M), fetestexcept(3M), math.h(3HEAD), attributes(5), standards(5)SunOS 5.10 1 Nov 2003 round(3M)
Although I have been registered on this board for some time I am going to seriously dive into Unix. Comming from and M$ back round in network design and sysadministration. I would like to learn the Unix OS that is most used in business. My question is if I get the Intel Version of Sun is that exact... (1 Reply)
Hello,
In a unix shell script,i want to round a variabele to a nearest number
Ex: set count=104.4
How can i round that to 105.?
Thanks,
Sateesh (2 Replies)
Hi all,
I have had a hunt round the net (and the forum (more importantly)) but carn't just see anything that helps. Does anyone care to put me out of my missery and tell me how to read a file into a variable?
thanks,
B14... aka... Marky Mark... (4 Replies)
Hi Friends,
I need a help again in awk.
I just need to round up a value.
Eg Say x=5.664584525
I need to display x=5.66 means round. How can i do round in UNIX. (6 Replies)
HI
I want to round off an integer to the next multiple of 10 in shell script.
(i.e.,) 91 should be rounded off to 100
and 90 should be rounded off to 90
It would be very helpful, if you can help me in this.
Thanks in advance (4 Replies)
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)
Is there a way I can round time in perl to the nearest five minutes?
For example if I have log giving the following time stamps
23,52,30 it would rounded up to 23,55,00
and
23,50,01 would be rounded to 23,50,00 (3 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:
1.58674
would be
1.58
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
2.99996,2.17890,3.00002,-2.3456,-2.7890
o/p should be like 3,2,3,-2,-3
thnks in adv!!!!
regards (3 Replies)
Hi,
I wanted to round all the values in a column to nearest integer. I have multiple files with only two columns and I want to round values in column 2. e.g
input_file
A1 23.971578 A2 34.624976 A3 46.403446 A4 375 A5 1 A6 3 A7 ... (3 Replies)