From a467b9c79ef47ad810f71dc0c59d685ac8cab132 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 22 Aug 2006 01:20:20 +0000 Subject: fixed things so that all but one of the objects compile into a libdir svn path=/trunk/externals/creb/; revision=5705 --- modules++/DSPI.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 modules++/DSPI.h (limited to 'modules++/DSPI.h') diff --git a/modules++/DSPI.h b/modules++/DSPI.h new file mode 100644 index 0000000..d9e2acf --- /dev/null +++ b/modules++/DSPI.h @@ -0,0 +1,16 @@ +#ifndef DSPI_h +#define DSPI_h + +#define DSPImin(x,y) (((x)<(y)) ? (x) : (y)) +#define DSPImax(x,y) (((x)>(y)) ? (x) : (y)) +#define DSPIclip(min, x, max) (DSPImin(DSPImax((min), (x)), max)) + + +// test if floating point number is denormal +#define DSPI_IS_DENORMAL(f) (((*(unsigned int *)&(f))&0x7f800000) == 0) + +// test if almost denormal, choose whichever is fastest +#define DSPI_IS_ALMOST_DENORMAL(f) (((*(unsigned int *)&(f))&0x7f800000) < 0x08000000) +//#define DSPI_IS_ALMOST_DENORMAL(f) (fabs(f) < 3.e-34) + +#endif -- cgit v1.2.1