# rintf(3) [opendarwin 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").

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);

long double
rintl(long double x);

float
rintf(float x);

long int
lrint(double x);

long int
lrintl(long double x);

long int
lrintf(float x);

long long int
llrint(double x);

long long int
llrintl(long double x);

long long int
llrintf(float x);

DESCRIPTION
The rint() functions return the integral value nearest to x (according to the prevailing rounding mode) in floating-point format.

The lrint() and llrint() 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").

NOTE
The rinttol() function is deprecated.  Please use the C99 function lrint() instead.

abs(3), fabs(3), ceil(3), floor(3), math(3)

STANDARDS
The rint() , lrint() , and llrint() functions conform to ISO/IEC 9899:2011.

BSD								   July 02, 2008							       BSD```
Man Page

## 1. Programming

: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...

## How do I stop printf output from going into seperate txt files

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...

## Printf unix command

Where would I get a good explanation for all the possibities when using the "printf" unix commmand.

## printf / regex

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:

## repeat character with printf

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

## The meaning of %s in printf

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...

## 7. Programming

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...

## Variable inside AWK printf

Hi, Is it possible to print a variable inside awk printf ?? the above is not working

## Problems with awk printf, formatted output

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,...

## File Splitter output filename

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...

## What is the difference between printf and putchar() or scanf and getchar() ?

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:

## Need help in printf in shell script

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...

## Printf statement for currency conversion

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)