[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

copysign, copysignf, or copysignl Subroutine

Purpose

Performs number manipulation.

Syntax

#include <math.h>

double copysign (x, y)
double x, double y;

float copysignf (x, y)
float x, float y;

long double copysignl (x, y)
long double x, long double y;

Description

The copysign, copysignf, and copysignl subroutines produce a value with the magnitude of x and the sign of y.

Parameters

x Specifies the magnitude.
y Specifies the sign.

Return Values

Upon successful completion, the copysign, copysignf and copysignl subroutines return a value with a magnitude of x and a sign of y.

Related Information

signbit in AIX 5L Version 5.2 Technical Reference: Base Operating System and Extensions Volume 2.

math.h in AIX 5L Version 5.2 Files Reference.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]