OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man3 / copysign.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 1993-07-24 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified 2002-08-10 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH COPYSIGN 3 2012\-03\-25 GNU "Linux Programmer's Manual"
35 .SH 名前
36 copysign, copysignf, copysignl \- 数の符号をコピーする
37 .SH 書式
38 .nf
39 \fB#include <math.h>\fP
40 .sp
41 \fBdouble copysign(double \fP\fIx\fP\fB, double \fP\fIy\fP\fB);\fP
42 .br
43 \fBfloat copysignf(float \fP\fIx\fP\fB, float \fP\fIy\fP\fB);\fP
44 .br
45 \fBlong double copysignl(long double \fP\fIx\fP\fB, long double \fP\fIy\fP\fB);\fP
46 .fi
47 .sp
48 \fI\-lm\fP でリンクする。
49 .sp
50 .in -4n
51 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
52 .in
53 .sp
54 .ad l
55 \fBcopysign\fP(), \fBcopysignf\fP(), \fBcopysignl\fP():
56 .RS 4
57 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE
58 || _POSIX_C_SOURCE\ >=\ 200112L;
59 .br
60 or \fIcc\ \-std=c99\fP
61 .RE
62 .ad b
63 .SH 説明
64 関数 \fBcopysign\fP()  は絶対値が \fIx\fP に等しく、符号ビットが \fIy\fP に等しい値を返す。
65
66 例えば、
67 \fIcopysign(42.0,\ \-1.0)\fP と \fIcopysign(\-42.0, \-1.0)\fP はどちらも \-42.0 を返す。
68 .SH 返り値
69 成功すると、これらの関数は、その絶対値は \fIx\fP に等しく、符号は \fIy\fP に等しい値を返す。
70
71 \fIx\fP が NaN の場合、NaN に \fIy\fP の符号ビットをつけて返す。
72 .SH エラー
73 エラーは発生しない。
74 .SH 準拠
75 .\" 4.3BSD.
76 C99, POSIX.1\-2001.  この関数は IEC 559 で定義されている (また IEEE 754/IEEE 854
77 では付録で推奨関数として定義されている)。
78 .SH 注意
79 浮動小数点形式が IEEE 754 準拠でないアーキテクチャでは、 \fBcopysign\fP()  は負の 0 を正として扱うことがある。
80 .SH 関連項目
81 \fBsignbit\fP(3)