OSDN Git Service

ac357b9712c7fee9d7ab6e75e725bac46aeea0db
[linuxjm/LDP_man-pages.git] / release / man3 / fabs.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 Sat Jul 24 19:42:04 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Added fabsl, fabsf, aeb, 2001-06-07
29 .\"
30 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
31 .\"       all rights reserved.
32 .\" Translated Mon Jan 20 20:29:27 JST 1997
33 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
34 .\" Updated & Modified Sun Jul  1 10:59:51 JST 2001
35 .\"       by Yuichi SATO <ysato@h4.dion.ne.jp>
36 .\" Updated & Modified Mon Jan 10 07:44:31 JST 2005
37 .\"       by Yuichi SATO <ysato444@yahoo.co.jp>
38 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
39 .\"
40 .TH FABS 3  2010-09-20 "" "Linux Programmer's Manual"
41 .SH 名前
42 fabs, fabsf, fabsl \- 浮動小数点実数の絶対値
43 .SH 書式
44 .nf
45 .B #include <math.h>
46 .sp
47 .BI "double fabs(double " x );
48 .br
49 .BI "float fabsf(float " x );
50 .br
51 .BI "long double fabsl(long double " x );
52 .fi
53 .sp
54 \fI\-lm\fP でリンクする。
55 .sp
56 .in -4n
57 glibc 向けの機能検査マクロの要件
58 .RB ( feature_test_macros (7)
59 参照):
60 .in
61 .sp
62 .ad l
63 .BR fabsf (),
64 .BR fabsl ():
65 .RS 4
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
67 _POSIX_C_SOURCE\ >=\ 200112L;
68 .br
69 or
70 .I cc\ -std=c99
71 .RE
72 .ad b
73 .SH 説明
74 .BR fabs ()
75 関数群は浮動小数点実数 \fIx\fP の絶対値を返す。
76 .SH 返り値
77 これらの関数は
78 .I x
79 の絶対値を返す。
80
81 .I x
82 が NaN の場合、NaN が返される。
83
84 .I x
85 が \-0 の場合、+0 が返される。
86
87 .I x
88 が負の無限大か正の無限大の場合、正の無限大が返される。
89 .SH エラー
90 エラーは起こらない。
91 .SH 準拠
92 C99, POSIX.1-2001.
93 .I double
94 版の関数は SVr4, 4.3BSD, C89 にも準拠している。
95 .SH 関連項目
96 .BR abs (3),
97 .BR cabs (3),
98 .BR ceil (3),
99 .BR floor (3),
100 .BR labs (3),
101 .BR rint (3)