# rint(3) [osx 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```

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

## can awk print column using a variable ??

i want to print the column file using awk or cut in dynamic manner like trmp=2;temp1=1;temp3=2 awk 'BEGIN{OFS=IFS="\t"} {print \$temp,\$temp1,\$temp3}' client_data.txt or cut -f \$temp1,\$temp2,\$temp3 -d"\t" file_name . but it is showing error , In awk can i use variable as in printing...

## Need to print certain lines from a file

Hi ALL, I want to print lines from file using certain conditions for exmple: # The following commands will create a new control file and use it # to open the database. # The contents of online logs will be lost and all backups will # be invalidated. Use this only if online logs are...

## Printing queue in rs6000

Hi, I'm at following old machine:@rs6000:/:> uname -a AIX rs6000 2 4 007016224C00 We are facing some problems with print queues, whenever a print queue gets stuck we cannot cancel it, we don't have any other option except restarting the machine, we have following queues:@rs6000:/etc:> lpstat...

## Script on pattern matching and print lines and export to excel

Hi Friends, I am working on a script.. Looking forward for your expert help..... My requirement is: I have a text file where, need to search equip * RTF or end of line with RTF ,once this pattern is found then print 2nd line, 6th line, 7th line to a different file. For Ex: equip 1...

## Print rows, having pattern in specific column...

Hello all, :) I have a pattern file some what like this, cd003 cd005 cd007 cd008 and input file like this, abc cd001 cd002 zca bca cd002 cd003 cza cba cd003 cd004 zca bac cd004 cd005 zac cba cd005 cd006 acz acb cd006 cd007 caz cab cd007 ...

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

## Setting printer paper length using unix commands

Hi Guys, I have been trying to resolve a printing problem but nothing works out . I have an Epson LQ 680 (dot matrix printer) . I need to print a file . The paper length should be 34 .Left margin should be 5. I have tried the following things after researching from the man pages. pr -t...

## Print filename and last line using awk

Hi, using awk command I want to print filenames and the last line of each file, in a single command line statement. I want to use 'awk', because I want to add more functionality to this logic later. I tried the following on *.sh files in the current directory find . -type f -name "*.sh"...

## Look up 2 files and print the concatenated output

file 1 Sun Mar 17 00:01:33 2013 submit , Name="1234" Sun Mar 17 00:01:33 2013 submit , Name="1344" Sun Mar 17 00:01:33 2013 submit , Name="1124" .. .. .. .. Sun Mar 17 00:01:33 2013 submit , Name="8901" file 2 Sun Mar 17 00:02:47 2013 1234 execute SUCCEEDED Sun Mar 17...

## How to print values that are greater than 0.1 in at least 80% of the samples?

input sample1 sample2 sample3 sample4 sample5 sample6 sample7 sample8 sample9 sample10 v1 0.2 0.1 0.1 0 1 2 3 4 9 10 v2 0 0 0.01 0 0 0 0 0 0 0 v3 0 0 0 0 0 ...

## 11. Shell Programming and Scripting

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!

## Grep echo awk print all output on one line

Hello, I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it. I've been asked to write a script that pulls a list of our CPE...

## Print byte position of extended ascii character

Hello, I am on AIX. When I encounter extended ascii characters and special characters on a file I need to print.. Byte position, actual character and line number. Is there a simple command that can give me the above result ? Thanks in advance

## Undeletable file

Greetings, I'm trying to delete a file with a weird name from within Terminal on a Mac. It's a very old file (1992) with null characters in the name: ââWord FinderÂŽ Plusâ˘. Here are some examples of what I've tried: 12FX009:5 dpontius\$ ls ââWord FinderÂŽ Plusâ˘ 12FX009:5 dpontius\$ rm...

## How to make paste -d second file print down while looping?

]I would like to make the second file label 'b' print down the first file label 'a', like shifting down the file creating new lines I want it to print all the way down until the first line of the second file hit the last line of the first file. Would I have to put this into a file itself or could I...