Scroll to navigation

COPYSIGN(3) Manual del Programador de Linux COPYSIGN(3)

NOMBRE

copysign, copysignf, copysignl - copian el signo de un número

SINOPSIS

#include <math.h>
double copysign(double x, double y);
float copysignf(float x, float y);
long double copysignl(long double x, long double y);

Enlazar con -lm.

Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)):

copysign(), copysignf(), copysignl():

_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE

DESCRIPCIÓN

These functions return a value whose absolute value matches that of x, but whose sign bit matches that of y.

For example, copysign(42.0, -1.0) and copysign(-42.0, -1.0) both return -42.0.

VALOR DEVUELTO

On success, these functions return a value whose magnitude is taken from x and whose sign is taken from y.

If x is a NaN, a NaN with the sign bit of y is returned.

ERRORES

No errors occur.

ATRIBUTOS

Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

Interfaz Atributo Valor
copysign(), copysignf(), copysignl() Seguridad del hilo Multi-hilo seguro

CONFORME A

C99, POSIX.1-2001, POSIX.1-2008. Esta función está definida en IEC 559 (y en el apéndice con funciones recomendadas de IEEE 754/IEEE 854).

NOTAS

On architectures where the floating-point formats are not IEEE 754 compliant, these functions may treat a negative zero as positive.

VÉASE TAMBIÉN

signbit(3)

COLOFÓN

Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Sebastian Desimone <chipy@argenet.com.ar>, Gerardo Aburruzaga García <gerardo.aburruzaga@uca.es> y Miguel Pérez Ibars <mpi79470@alu.um.es>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

15 Septiembre 2017 GNU