.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu) .\" Modified 2002-08-10 by Walter Harms (walter.harms@informatik.uni-oldenburg.de) .\" .\" Japanese Version Copyright (c) 1997 Hiroaki Nagoya .\" all rights reserved. .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya .\" Updated 2002-08-24 by Akihiro MOTOKI .\" Updated 2007-06-01, Akihiro MOTOKI, LDP v2.50 .\" Updated 2008-09-15, Akihiro MOTOKI .\" .TH COPYSIGN 3 2010-09-20 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .\"O copysign, copysignf, copysignl \- copy sign of a number .SH 名前 copysign, copysignf, copysignl \- 数の符号をコピーする .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .BI "double copysign(double " x ", double " y ); .br .BI "float copysignf(float " x ", float " y ); .br .BI "long double copysignl(long double " x ", long double " y ); .fi .sp .\"O Link with \fI\-lm\fP. \fI\-lm\fP でリンクする。 .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR copysign (), .BR copysignf (), .BR copysignl (): .RS 4 _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\ >=\ 200112L; .br or .I cc\ -std=c99 .RE .ad b .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR copysign () .\"O functions return a value whose absolute value matches .\"O that of \fIx\fP, but whose sign bit matches that of \fIy\fP. 関数 .BR copysign () は絶対値が \fIx\fP に等しく、符号ビットが \fIy\fP に等しい値を返す。 .\"O .SH RETURN VALUE .SH 返り値 .\"O On success, these functions return a value whose magnitude is taken from .\"O .I x .\"O and whose sign is taken from .\"O .IR y . 成功すると、これらの関数は、その絶対値は .I x に等しく、符号は .I y に等しい値を返す。 .\"O If \fIx\fP is a NaN, .\"O a NaN with the sign bit of \fIy\fP is returned. .\"O .SH ERRORS .\"O No errors occur. \fIx\fP が NaN の場合、NaN に \fIy\fP の符号ビットをつけて返す。 .\"O .SH "CONFORMING TO" .SH 準拠 C99, POSIX.1-2001. .\" 4.3BSD. .\"O This function is defined in IEC 559 (and the appendix with .\"O recommended functions in IEEE 754/IEEE 854). この関数は IEC 559 で定義されている。 (また IEEE 754/IEEE 854 では、付録で推奨関数として定義されている。) .\"O .SH NOTES .SH 注意 .\"O On architectures where the floating-point formats are not IEEE 754 compliant, .\"O the .\"O .BR copysign () .\"O functions may treat a negative zero as positive. 浮動小数点形式が IEEE 754 準拠でないアーキテクチャでは、 .BR copysign () は負の 0 を正として扱うことがある。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR signbit (3)