866f72bc25db3c8684a87abbc5ee654bdb866724
* Copyright (c) 1992 The Regents of the University of California.
* This software was developed by the Computer Systems Engineering group
* at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
* contributed to Berkeley.
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)fixdfdi.c 5.3 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#ifndef QUAD_MAX /* should be in <limits.h> maybe? */
#define QUAD_MAX ((quad)(((u_quad)1 << (QUAD_BITS - 1)) - 1))
#define QUAD_MIN (-QUAD_MAX - 1)
* Convert double to (signed) quad.
* We clamp anything that is out of range.
return ((quad
)-(u_quad
)-x
);
return ((quad
)(u_quad
)x
);