OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / release / man3 / abs.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Mon Mar 29 22:31:13 1993, David Metcalfe
30 .\" Modified Sun Jun  6 23:27:50 1993, David Metcalfe
31 .\" Modified Sat Jul 24 21:45:37 1993, Rik Faith (faith@cs.unc.edu)
32 .\" Modified Sat Dec 16 15:02:59 2000, Joseph S. Myers
33 .\"
34 .\"*******************************************************************
35 .\"
36 .\" This file was generated with po4a. Translate the source file.
37 .\"
38 .\"*******************************************************************
39 .\"
40 .\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
41 .\"         all rights reserved.
42 .\" Translated Sat, 13 Jul 1996 22:44:04 +0900
43 .\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
44 .\" Updated Mon 29 Jan 2001 17:18:34 JST by Kentaro Shirakata <argrath@ub32.org>
45 .\"
46 .TH ABS 3 2014\-08\-19 GNU "Linux Programmer's Manual"
47 .SH 名前
48 abs, labs, llabs, imaxabs \- 整数の絶対値を計算する
49 .SH 書式
50 .nf
51 \fB#include <stdlib.h>\fP
52 .sp
53 \fBint abs(int \fP\fIj\fP\fB);\fP
54 .br
55 \fBlong int labs(long int \fP\fIj\fP\fB);\fP
56 .br
57 \fBlong long int llabs(long long int \fP\fIj\fP\fB);\fP
58 .sp
59 \fB#include <inttypes.h>\fP
60 .sp
61 \fBintmax_t imaxabs(intmax_t \fP\fIj\fP\fB);\fP
62 .fi
63 .sp
64 .in -4n
65 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
66 .in
67 .sp
68 .ad l
69 \fBllabs\fP():
70 .RS 4
71 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L;
72 .br
73 or \fIcc\ \-std=c99\fP
74 .RE
75 .ad
76 .SH 説明
77 \fBabs\fP()  関数は、整数の引数 \fIj\fP の絶対値を計算する。 \fBlabs\fP(), \fBllabs\fP(), \fBimaxabs\fP()
78 関数は、 それぞれの関数の型に応じた引数 \fIj\fP の絶対値を計算する。
79 .SH 返り値
80 それぞれの関数の型に応じた整数の引数の絶対値を返す。
81 .SH 属性
82 .SS "マルチスレッディング (pthreads(7) 参照)"
83 関数 \fBabs\fP(), \fBlabs\fP(), \fBllabs\fP(), \fBimaxabs\fP() はスレッドセーフである。
84 .SH 準拠
85 .\" POSIX.1 (1996 edition) requires only the
86 .\" .BR abs ()
87 .\" function.
88 SVr4, POSIX.1\-2001, 4.3BSD, C99.  C89 は \fBabs\fP()  関数と \fBlabs\fP()  関数のみを含んでいる。
89 \fBllabs\fP()  関数と \fBimaxabs\fP()  関数は C99 で追加された。
90 .SH 注意
91 最大の負整数の絶対値は、定義されていない。
92 .PP
93 \fBllabs\fP()  関数はバージョン 2.0 から glibc に含まれるようになった。 \fBimaxabs\fP()  関数は バージョン 2.1.1
94 から glibc に含まれるようになった。
95 .PP
96 \fBllabs\fP()  が宣言されるためには、標準ヘッダーを include する前に \fB_ISOC99_SOURCE\fP か
97 \fB_ISOC9X_SOURCE\fP(どちらかは glibc の バージョンに依存する)を define しておく必要がある。
98 .PP
99 デフォルトで、GCC は \fBabs\fP(), \fBlabs\fP() および (GCC 3.0 以降では) \fBllabs\fP() と
100 \fBimaxabs\fP() をビルドイン関数として扱う。
101 .SH 関連項目
102 \fBcabs\fP(3), \fBceil\fP(3), \fBfabs\fP(3), \fBfloor\fP(3), \fBrint\fP(3)
103 .SH この文書について
104 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部
105 である。プロジェクトの説明とバグ報告に関する情報は
106 http://www.kernel.org/doc/man\-pages/ に書かれている。