diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-08-22 01:20:20 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-08-22 01:20:20 +0000 |
commit | a467b9c79ef47ad810f71dc0c59d685ac8cab132 (patch) | |
tree | 06af48a67b52647b85460340d3693552d0762397 /modules++/DSPI.h | |
parent | e1abec66df4f1c071c3d25caa768fe1a98781a13 (diff) |
fixed things so that all but one of the objects compile into a libdir
svn path=/trunk/externals/creb/; revision=5705
Diffstat (limited to 'modules++/DSPI.h')
-rw-r--r-- | modules++/DSPI.h | 16 |
1 files changed, 16 insertions, 0 deletions
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 |