
/*
 *****************************************************************************
 **       This file was autogenerated from a template  DO NOT EDIT!!!!      **
 **       Changes should be made to the original source (.src) file         **
 **       Produced by conv_template.py                                      **
 *****************************************************************************
 */

#line 1
/* -*- c -*- */

/* Part of numpy/core/src/npymath/ieee754.c.src */

/*
 * vim:syntax=c
 *
 * Low-level routines related to IEEE-754 format
 */
#include "export.h"
#include "npy_math_common.h"
#include "npy_math_private.h"

#if !HAVE_COPYSIGN
DL_EXPORT(double) npy_copysign(double x, double y)
{
    npy_uint32 hx, hy;
    GET_HIGH_WORD(hx, x);
    GET_HIGH_WORD(hy, y);
    SET_HIGH_WORD(x, (hx & 0x7fffffff) | (hy & 0x80000000));
    return x;
}
#endif

/*
 The below code is provided for compilers which do not yet provide C11 compatibility (gcc 4.5 and older)
 */
#ifndef LDBL_TRUE_MIN  
#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
#endif

#if !defined(HAVE_DECL_SIGNBIT)
#include "_signbit.c"

int _npy_signbit_f(float x)
{
    return _npy_signbit_d((double) x);
}

int _npy_signbit_ld(long double x)
{
    return _npy_signbit_d((double) x);
}
#endif
