RINT(3) BSD Library Functions Manual RINT(3)NAME
nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl -- round to integral value in floating-point format
LIBRARY
Math Library (libm, -lm)
SYNOPSIS
#include <math.h>
double
nearbyint(double x);
float
nearbyintf(float x);
long double
nearbyintl(long double x);
double
rint(double x);
float
rintf(float x);
long double
rintl(long double x);
DESCRIPTION
The rint(), rintf(), and rintl() functions return the integral value nearest to x according to the prevailing rounding mode. These functions
raise an inexact exception when the original argument is not an exact integer.
The nearbyint(), nearbyintf(), and nearbyintl() functions perform the same operation, except that they do not raise an inexact exception.
SEE ALSO abs(3), ceil(3), fabs(3), fenv(3), floor(3), ieee(3), lrint(3), lround(3), math(3), round(3)STANDARDS
These functions conform to ISO/IEC 9899:1999 (``ISO C99'').
HISTORY
A rint() function appeared in Version 6 AT&T UNIX. The nearbyint() and nearbyintf() functions appeared in FreeBSD 5.3, and the long double
variants were first available in FreeBSD 8.0.
BSD January 13, 2008 BSD
Check Out this Related Man Page
RINT(3) BSD Library Functions Manual RINT(3)NAME
nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl -- round to integral value in floating-point format
LIBRARY
Math Library (libm, -lm)
SYNOPSIS
#include <math.h>
double
nearbyint(double x);
float
nearbyintf(float x);
long double
nearbyintl(long double x);
double
rint(double x);
float
rintf(float x);
long double
rintl(long double x);
DESCRIPTION
The rint(), rintf(), and rintl() functions return the integral value nearest to x according to the prevailing rounding mode. These functions
raise an inexact exception when the original argument is not an exact integer.
The nearbyint(), nearbyintf(), and nearbyintl() functions perform the same operation, except that they do not raise an inexact exception.
SEE ALSO abs(3), ceil(3), fabs(3), fenv(3), floor(3), ieee(3), lrint(3), lround(3), math(3), round(3)STANDARDS
These functions conform to ISO/IEC 9899:1999 (``ISO C99'').
HISTORY
A rint() function appeared in Version 6 AT&T UNIX. The nearbyint() and nearbyintf() functions appeared in FreeBSD 5.3, and the long double
variants were first available in FreeBSD 8.0.
BSD January 13, 2008 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)