OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / release / man3 / abs.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Mon Mar 29 22:31:13 1993, David Metcalfe
28 .\" Modified Sun Jun  6 23:27:50 1993, David Metcalfe
29 .\" Modified Sat Jul 24 21:45:37 1993, Rik Faith (faith@cs.unc.edu)
30 .\" Modified Sat Dec 16 15:02:59 2000, Joseph S. Myers
31 .\"
32 .\" Japanese Version Copyright (c) 1996 Kentaro OGAWA
33 .\"         all rights reserved.
34 .\" Translated Sat, 13 Jul 1996 22:44:04 +0900
35 .\"         by Kentaro OGAWA <k_ogawa@oyna.cc.muroran-it.ac.jp>
36 .\" Updated Mon 29 Jan 2001 17:18:34 JST by Kentaro Shirakata <argrath@ub32.org>
37 .\"
38 .TH ABS 3  2010-09-20 "GNU" "Linux Programmer's Manual"
39 .SH Ì¾Á°
40 abs, labs, llabs, imaxabs \- À°¿ô¤ÎÀäÂÐÃͤò·×»»¤¹¤ë
41 .SH ½ñ¼°
42 .nf
43 .B #include <stdlib.h>
44 .sp
45 .BI "int abs(int " j );
46 .br
47 .BI "long int labs(long int " j );
48 .br
49 .BI "long long int llabs(long long int " j );
50 .sp
51 .B #include <inttypes.h>
52 .sp
53 .BI "intmax_t imaxabs(intmax_t " j );
54 .fi
55 .sp
56 .in -4n
57 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
58 .RB ( feature_test_macros (7)
59 »²¾È):
60 .in
61 .sp
62 .ad l
63 .BR llabs ():
64 .RS 4
65 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
66 _POSIX_C_SOURCE\ >=\ 200112L;
67 .br
68 or
69 .I cc\ -std=c99
70 .ad
71 .SH ÀâÌÀ
72 .BR abs ()
73 ´Ø¿ô¤Ï¡¢À°¿ô¤Î°ú¿ô \fIj\fP ¤ÎÀäÂÐÃͤò·×»»¤¹¤ë¡£
74 .BR labs (),
75 .BR llabs (),
76 .BR imaxabs ()
77 ´Ø¿ô¤Ï¡¢
78 ¤½¤ì¤¾¤ì¤Î´Ø¿ô¤Î·¿¤Ë±þ¤¸¤¿°ú¿ô \fIj\fP ¤ÎÀäÂÐÃͤò·×»»¤¹¤ë¡£
79 .SH ÊÖ¤êÃÍ
80 ¤½¤ì¤¾¤ì¤Î´Ø¿ô¤Î·¿¤Ë±þ¤¸¤¿À°¿ô¤Î°ú¿ô¤ÎÀäÂÐÃͤòÊÖ¤¹¡£
81 .SH ½àµò
82 SVr4, POSIX.1-2001, 4.3BSD, C99.
83 .\" POSIX.1 (1996 Ç¯ÈÇ) ¤Ï
84 .\" .BR abs ()
85 .\" ´Ø¿ô¤Î¤ß¤òÍ׵ᤷ¤Æ¤¤¤ë¡£
86 C89 ¤Ï
87 .BR abs ()
88 ´Ø¿ô¤È
89 .BR labs ()
90 ´Ø¿ô¤Î¤ß¤ò´Þ¤ó¤Ç¤¤¤ë¡£
91 .BR llabs ()
92 ´Ø¿ô¤È
93 .BR imaxabs ()
94 ´Ø¿ô¤Ï C99 ¤ÇÄɲ䵤줿¡£
95 .SH Ãí°Õ
96 ºÇÂç¤ÎÉéÀ°¿ô¤ÎÀäÂÐÃͤϡ¢ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
97 .PP
98 .BR llabs ()
99 ´Ø¿ô¤Ï¥Ð¡¼¥¸¥ç¥ó 2.0 ¤«¤é glibc ¤Ë´Þ¤Þ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤¬¡¢
100 libc5 ¤ä libc4 ¤Ë¤Ï¤Ê¤¤¡£
101 .BR imaxabs ()
102 ´Ø¿ô¤Ï ¥Ð¡¼¥¸¥ç¥ó 2.1.1 ¤«¤é glibc ¤Ë´Þ¤Þ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡£
103 .PP
104 .BR llabs ()
105 ¤¬Àë¸À¤µ¤ì¤ë¤¿¤á¤Ë¤Ï¡¢É¸½à¥Ø¥Ã¥À¤ò include ¤¹¤ëÁ°¤Ë
106 \fB_ISOC99_SOURCE\fP ¤« \fB_ISOC9X_SOURCE\fP(¤É¤Á¤é¤«¤Ï glibc ¤Î
107 ¥Ð¡¼¥¸¥ç¥ó¤Ë°Í¸¤¹¤ë)¤ò define ¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¡£
108 .PP
109 GCC ¤Ï
110 .BR abs ()
111 ¤È
112 .BR labs ()
113 ¤ò¥Ó¥ë¥É¥¤¥ó´Ø¿ô¤È¤·¤Æ°·¤¦¡£
114 GCC 3.0 ¤Ï
115 .BR llabs ()
116 ¤È
117 .BR imaxabs ()
118 ¤â¥Ó¥ë¥É¥¤¥ó¤È¤·¤Æ°·¤¦¡£
119 .SH ´ØÏ¢¹àÌÜ
120 .BR cabs (3),
121 .BR ceil (3),
122 .BR fabs (3),
123 .BR floor (3),
124 .BR rint (3)