Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

abs(3) [minix man page]

ABS(3)							     Library Functions Manual							    ABS(3)

abs - integer absolute value SYNOPSIS
#include <stdlib.h> int abs(int i) DESCRIPTION
Abs returns the absolute value of its integer operand. SEE ALSO
floor(3). BUGS
Applying the abs function to the most negative integer generates a result which is the most negative integer. That is, abs(0x80000000) returns 0x80000000 as a result on a machine with 32-bit ints. Using the result in unsigned computations is sound however. 7th Edition May 15, 1985 ABS(3)

Check Out this Related Man Page

ABS(3P) 						     POSIX Programmer's Manual							   ABS(3P)

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
abs - return an integer absolute value SYNOPSIS
#include <stdlib.h> int abs(int i); DESCRIPTION
The abs() function shall compute the absolute value of its integer operand, i. If the result cannot be represented, the behavior is unde- fined. RETURN VALUE
The abs() function shall return the absolute value of its integer operand. ERRORS
No errors are defined. The following sections are informative. EXAMPLES
In two's-complement representation, the absolute value of the negative integer with largest magnitude {INT_MIN} might not be representable. RATIONALE
fabs(), labs(), the Base Definitions volume of IEEE Std 1003.1-2001, <stdlib.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at . IEEE
/The Open Group 2003 ABS(3P)
Man Page

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

absolute beginner with suse 9.2 and XP Pro

I'm sure this is pretty infantile but I can't figute it out. How to I load the nVidia driver for SuSE 9.2? I have no idea what the X environment is or how to quit it or how to run the nVidia patch. Secondly how do I persuade my SuSE 9.3 computer to talk with my Windows XP network. Linux... (9 Replies)
Discussion started by: mrgmwsnow
9 Replies

2. Shell Programming and Scripting

find & copy files with absolute path

hi all, can i get script find file & copy that file with path for an example sourse : /home/abc/ destination : /home/backup/ files which need to find : tmp* copy these files with its absolute path inside like :- /home/abc/x/y/z/tmp.txt to /home/backup/date/x/y/z/tmp.txt thanks in... (15 Replies)
Discussion started by: jagnikam
15 Replies

3. Solaris

Urgent!! Dumpstabs Utility

Hi Everyone, I need to invoke the dumpstabs utility on Solaris 10. OS details : SunOS frtsunserver 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V440 when i key in the command dumpstabs -v it says "dumpstabs not found. (13 Replies)
Discussion started by: sankasu
13 Replies

4. Shell Programming and Scripting

absolute path for a script ran with relative path

I have a script in which i want to print absolute path of the same script irrespective of path from where i run script. I am using echo "pwd : `pwd`" echo "script name: $0" echo "dirname: `dirname $0`" when i run script from /my/test/dir/struct as ../ the output i... (10 Replies)
Discussion started by: rss67
10 Replies

5. UNIX for Dummies Questions & Answers

Extracting parts from an absolute path

Hi, How can I extract parts from an absolute path? For example : The absolute path is /dir1/dir2/dir3/dir4/dir5.I need the relative path starting with directory given as parameter : for instance if the parameter is dir3 then the result should be dir3/dir4/dir5 I need generic solution... (9 Replies)
Discussion started by: mortanon
9 Replies

6. Shell Programming and Scripting

spaces to tabs - group with IP

hi buddies; i have a file.txt: Note: All the seperators are SPACE. ParameterObject=1 Speech 1 ParameterObject=2 Speech 1 ParamFunction=1 UserID 1 (DEACTIVATED) Sector=1,Device=2,Unit=3 DeviceId 1 FeederCable=2B ... (18 Replies)
Discussion started by: gc_sw
18 Replies

7. Shell Programming and Scripting

replace spaces/tabs with delimiter |

Hi, I'm looking for a command that replaces spaces/tabs with pipe symbol and store the result to the same file instead of routing it to another file. infile outfile Thanks. (11 Replies)
Discussion started by: dvah
11 Replies

8. Shell Programming and Scripting

A highly abstract function invocation, just enjoy it ,guys! #!/bin/bash loop() { for((${1}=0; ${1}<${2}; ++${1})); do eval \$\{{3..12}\} done } numb() { echo -n "${!1}${!2}${!3} " (( ${3} == 2 )) && echo } eval loop" "{i..k}" 3" numb {i..k} (10 Replies)
Discussion started by: complex.invoke
10 Replies

9. Shell Programming and Scripting

Absolute value function

None know if exists a function/command that get the absolute value for a number? Thanks:) (14 Replies)
Discussion started by: Steph85
14 Replies

10. Shell Programming and Scripting

[Solved] Insert tabs as delimiter

Hello all, I have an unstructured file with space as delimiter , which I want to structure. The output file should actually have only 5 columns with tab as delimiter. The 4th column can have only 3 values ( biological_process , cellular_component , molecular_function ) Here is how the... (12 Replies)
Discussion started by: ritakadm
12 Replies