xref: /openbsd-src/lib/libm/man/copysign.3 (revision 86f9d4cdda0e0267dccd8755ac0035525579c4a7)
1*86f9d4cdStedu.\"	$OpenBSD: copysign.3,v 1.4 2013/06/05 03:40:26 tedu Exp $
2f66cd146Smartynas.\" Copyright (c) 1985, 1991 Regents of the University of California.
3f66cd146Smartynas.\" All rights reserved.
4f66cd146Smartynas.\"
5f66cd146Smartynas.\" Redistribution and use in source and binary forms, with or without
6f66cd146Smartynas.\" modification, are permitted provided that the following conditions
7f66cd146Smartynas.\" are met:
8f66cd146Smartynas.\" 1. Redistributions of source code must retain the above copyright
9f66cd146Smartynas.\"    notice, this list of conditions and the following disclaimer.
10f66cd146Smartynas.\" 2. Redistributions in binary form must reproduce the above copyright
11f66cd146Smartynas.\"    notice, this list of conditions and the following disclaimer in the
12f66cd146Smartynas.\"    documentation and/or other materials provided with the distribution.
13f66cd146Smartynas.\" 3. Neither the name of the University nor the names of its contributors
14f66cd146Smartynas.\"    may be used to endorse or promote products derived from this software
15f66cd146Smartynas.\"    without specific prior written permission.
16f66cd146Smartynas.\"
17f66cd146Smartynas.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18f66cd146Smartynas.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19f66cd146Smartynas.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20f66cd146Smartynas.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21f66cd146Smartynas.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22f66cd146Smartynas.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23f66cd146Smartynas.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24f66cd146Smartynas.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25f66cd146Smartynas.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26f66cd146Smartynas.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27f66cd146Smartynas.\" SUCH DAMAGE.
28f66cd146Smartynas.\"
29f66cd146Smartynas.\"     from: @(#)ieee.3	6.4 (Berkeley) 5/6/91
30f66cd146Smartynas.\"
31*86f9d4cdStedu.Dd $Mdocdate: June 5 2013 $
32f66cd146Smartynas.Dt COPYSIGN 3
33f66cd146Smartynas.Os
34f66cd146Smartynas.Sh NAME
35f66cd146Smartynas.Nm copysign ,
36f66cd146Smartynas.Nm copysignf ,
37f66cd146Smartynas.Nm copysignl
38f66cd146Smartynas.Nd copy sign
39f66cd146Smartynas.Sh SYNOPSIS
40*86f9d4cdStedu.In math.h
41f66cd146Smartynas.Ft double
42f66cd146Smartynas.Fn copysign "double x" "double y"
43f66cd146Smartynas.Ft float
44f66cd146Smartynas.Fn copysignf "float x" "float y"
45f66cd146Smartynas.Ft long double
46f66cd146Smartynas.Fn copysignl "long double x" "long double y"
47f66cd146Smartynas.Sh DESCRIPTION
48f66cd146Smartynas.Fn copysign
49f66cd146Smartynasreturns
50f66cd146Smartynas.Fa x
51f66cd146Smartynaswith its sign changed to
52f66cd146Smartynas.Fa y Ns 's.
53f66cd146SmartynasThe
54f66cd146Smartynas.Fn copysignf
55f66cd146Smartynasfunction is a single precision version of
56f66cd146Smartynas.Fn copysign .
57f66cd146SmartynasThe
58f66cd146Smartynas.Fn copysignl
59f66cd146Smartynasfunction is an extended precision version of
60f66cd146Smartynas.Fn copysign .
61f66cd146Smartynas.Sh SEE ALSO
620714f1f8Smartynas.Xr fabs 3
63f66cd146Smartynas.Sh STANDARDS
64f66cd146Smartynas.St -ieee754
65f66cd146Smartynas.Sh HISTORY
66f66cd146SmartynasThe
67f66cd146Smartynas.Nm copysign ,
688f740a56Smartynas.Nm copysignf
69f66cd146Smartynasand
70f66cd146Smartynas.Nm copysignl
71f66cd146Smartynasfunctions appeared in
728f740a56Smartynas.Bx 4.3 ,
738f740a56Smartynas.Nx 1.1
748f740a56Smartynasand
758f740a56Smartynas.Ox 4.5 ,
768f740a56Smartynasrespectively.
77