OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / copysign.3
index 7da545c..e354516 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" 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.
@@ -19,6 +20,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" References consulted:
 .\"     Linux libc source code
@@ -26,7 +28,7 @@
 .\"     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)
-.TH COPYSIGN 3  2008-08-05 "GNU" "Linux Programmer's Manual"
+.TH COPYSIGN 3  2013-10-14 "GNU" "Linux Programmer's Manual"
 .SH NAME
 copysign, copysignf, copysignl \- copy sign of a number
 .SH SYNOPSIS
@@ -51,33 +53,70 @@ Feature Test Macro Requirements for glibc (see
 .BR copysign (),
 .BR copysignf (),
 .BR copysignl ():
-_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
+.RS 4
+_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
+_POSIX_C_SOURCE\ >=\ 200112L;
+.br
+or
 .I cc\ -std=c99
+.RE
 .ad b
 .SH DESCRIPTION
 The
-.BR copysign ()
+.BR copysign (),
+.BR copysignf (),
+and
+.BR copysignl ()
 functions return a value whose absolute value matches
-that of \fIx\fP, but whose sign bit matches that of \fIy\fP.
+that of
+.IR x ,
+but whose sign bit matches that of
+.IR y .
+
+For example,
+.I "copysign(42.0,\ \-1.0)"
+and
+.I "copysign(\-42.0, \-1.0)"
+both return \-42.0.
 .SH RETURN VALUE
 On success, these functions return a value whose magnitude is taken from
 .I x
 and whose sign is taken from
 .IR y .
 
-If \fIx\fP is a NaN,
-a NaN with the sign bit of \fIy\fP is returned.
+If
+.I x
+is a NaN,
+a NaN with the sign bit of
+.I y
+is returned.
 .SH ERRORS
 No errors occur.
-.SH "CONFORMING TO"
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR copysign (),
+.BR copysignf (),
+and
+.BR copysignl ()
+functions are thread-safe.
+.SH CONFORMING TO
 C99, POSIX.1-2001.
 .\" 4.3BSD.
 This function is defined in IEC 559 (and the appendix with
 recommended functions in IEEE 754/IEEE 854).
 .SH NOTES
 On architectures where the floating-point formats are not IEEE 754 compliant,
-the
-.BR copysign ()
+these
 functions may treat a negative zero as positive.
-.SH "SEE ALSO"
+.SH SEE ALSO
 .BR signbit (3)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.