RINT(3) BSD Library Functions Manual RINT(3)NAME
rint, lrint, llrint -- round to integral value
SYNOPSIS
#include <math.h>
double
rint(double x);
float
rintf(float x);
long int
lrint(double x);
long int
lrintf(float x);
long long int
llrint(double x);
long long int
llrintf(float x);
DESCRIPTION
The rint() and rintf() functions return the integral value nearest to x (according to the prevailing rounding mode) in floating-point format.
The lrint() , lrintf() , llrint() and llrintf() functions return the integral value nearest to x (according to the prevailing rounding mode)
in the return formats specified. If the rounded value is outside the range of the return type, the numeric result is unspecified and the
"invalid" floating-point exception is raised. A range error may occur if the magnitude of x is too large.
SPECIAL VALUES
rint(+-0) returns +-0 for all rounding modes.
rint(+-infinity) returns +-infinity for all rounding modes.
All these functions raise the "inexact" floating-point exception if the result differs in value from the argument (except when they raise
some other floating-point exception, such as "invalid").
SEE ALSO abs(3), fabs(3), ceil(3), floor(3), ieee(3), math(3)STANDARDS
The rint() , rintf() , lrint() , lrintf() , llrint() , and llrintf() functions conform to ISO/IEC 9899:1999(E).
BSD January 23, 2003 BSD
Check Out this Related Man Page
RINT(3) BSD Library Functions Manual RINT(3)NAME
rint, lrint, llrint -- round to integral value
SYNOPSIS
#include <math.h>
double
rint(double x);
float
rintf(float x);
long int
lrint(double x);
long int
lrintf(float x);
long long int
llrint(double x);
long long int
llrintf(float x);
DESCRIPTION
The rint() and rintf() functions return the integral value nearest to x (according to the prevailing rounding mode) in floating-point format.
The lrint() , lrintf() , llrint() and llrintf() functions return the integral value nearest to x (according to the prevailing rounding mode)
in the return formats specified. If the rounded value is outside the range of the return type, the numeric result is unspecified and the
"invalid" floating-point exception is raised. A range error may occur if the magnitude of x is too large.
SPECIAL VALUES
rint(+-0) returns +-0 for all rounding modes.
rint(+-infinity) returns +-infinity for all rounding modes.
All these functions raise the "inexact" floating-point exception if the result differs in value from the argument (except when they raise
some other floating-point exception, such as "invalid").
SEE ALSO abs(3), fabs(3), ceil(3), floor(3), ieee(3), math(3)STANDARDS
The rint() , rintf() , lrint() , lrintf() , llrint() , and llrintf() functions conform to ISO/IEC 9899:1999(E).
BSD January 23, 2003 BSD
:confused:
Hi!
I have created a Multhreaded Application in Pro*C (using pthreads) with about 5 Threads running simultaneously. The Application is basically to Update a Centralized Table in Oracle, which updates different rows in the Table (Each Thread updates different rows!). The... (16 Replies)
I am using
printf "%-75s%+10s %5s %1s \n" $s $z $x $y > status
It works really well, however, when I email status it is sending 10 emails when I would like it to be in one.
Is there a way to make all the output to go into one instance of a txt file. Yet still keep it 1 on each... (12 Replies)
Morning folks,
I need help with the following issue:
Let's say we I have the following output:
First Name: Test
Last Name: Test2
Number: T1234
Number2: T1234
Needed Output:
T1234
Now I want to grep/nawk/printf/sed out the Number: (13 Replies)
It's all in the subject. I try to figure out how to repeat a character a number of time with printf.
For example to draw a line in a script output.
Thks (13 Replies)
I have this command like that has %s in it, I know %s calls a column, but I am not sure I understand which column (I mean for my case I can check the input file, but I want to know how is this %s used, how comes tha same symbo; gives different columns in one command line:
{printf "grep %s... (22 Replies)
So I've been working on this for some time now and can't seem to find the solution that works for me. I'm working in C/Unix. Basically, I want to take a user input and output something different. For example, I want to take a password and output *'s. In another instance, I want to take inputed... (35 Replies)
Hi,
i have a script, which is incomplete, am on my way developing it.
Input
1,12,2012,IF_TB001
2,12,2012,3K3
3,Z56,00000,25,229,K900,00, ,3G3, ,USD, ,0000000000,000, , , , 550000000
3,Z56,00000,53,411,W225,00,000, , ,USD,OM170,0000000000,000, , , , -550000000
4,Z56,COUNT, 4,SUM LOC,... (19 Replies)
Issue: I am able to split source file in multiple files of 10 rows each but unable to get the required outputfile name. please advise.
Details:
input = A.txt having 44 rows
required output = A_001.txt , A_002.txt and so on. Can below awk be modified to give required result
current... (19 Replies)
Im a newbie to programming language, i found tat there r these function called printf and putchar() as well as scanf and getchar(), im curious abt why do dey hav these 2 different function although dey r doing the same instruction? :confused: (13 Replies)
My requirement is need to add spaces to the string with the dynamic value to printf... this is a part of shell script ..which i have , the length is not static ...
length=15
value="1234567890"
printf "%-"$length"s\n" "$value";
The result it is printing is ... i am not sure y it is... (19 Replies)
hi all,
I had my script as
a=qw
b=rter
c=fdfd
curency=1000
printf"${curency} $a $b $c" > filename
can i have printf statement that can change the currency from 1000 to 1,000 like it should convert the number to currency format ..?(i.e for any number) (14 Replies)
Is possible to print padded string in printf?
Example
echo 1 | awk '{printf("%03d\n", $1)}'
001I want
S1
S11
S2
S21to be padded as:
S01
S11
S02
S21Thanks! (26 Replies)
I have a file hello.txt which was created today (today's date timestamp)
I wish to change its date timestamp (access, modified, created) to 1 week old i.e one week from now.
uname -a
SunOS mymac 5.11 11.2 sun4v sparc sun4v
Can you please suggest a easy way to do that ? (12 Replies)