From a7e6303e3e7e87bf90b21821d2e419ed4799783c Mon Sep 17 00:00:00 2001 From: musil Date: Fri, 28 Jun 2013 17:25:22 +0000 Subject: initial check in of double precision library of iem svn path=/trunk/externals/iem/iem_dp/; revision=17167 --- src/iem_dp.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 src/iem_dp.h (limited to 'src/iem_dp.h') diff --git a/src/iem_dp.h b/src/iem_dp.h new file mode 100755 index 0000000..18789d2 --- /dev/null +++ b/src/iem_dp.h @@ -0,0 +1,49 @@ +/* For information on usage and redistribution, and for a DISCLAIMER OF ALL +* WARRANTIES, see the file, "LICENSE.txt," in this distribution. + +iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2013 */ +/* double precision library */ + +#ifndef __IEM_DP_H__ +#define __IEM_DP_H__ + +/* #ifdef __i386__ */ + +/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */ + +/* +#define PD_BIGORSMALL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \ + (((*(unsigned int*)&(f))&0x60000000)==0x60000000)) +#else +#define PD_BIGORSMALL(f) 0 +#endif + +#endif +*/ + +t_float iem_dp_cast_to_float(double d); +double iem_dp_cast_to_double(t_float f); +t_float iem_dp_calc_residual(double d, t_float f); + +double iem_dp_calc_sum(t_float f, t_float r); + +extern int ugen_getsortno(void); + +#endif + +/* +#ifdef Z_USE_WORD_ARRAYS + +#define zarray_t t_word +#define zarray_getarray garray_getfloatwords +#define zarray_getfloat(pointer, index) (pointer[index].w_float) +#define zarray_setfloat(pointer, index, value) (pointer[index].w_float = value) + +#else + +#define zarray_t t_float +#define zarray_getarray garray_getfloatarray +#define zarray_getfloat(pointer, index) (pointer[index]) +#define zarray_setfloat(pointer, index, value) (pointer[index] = value) + +#endif*/ -- cgit v1.2.1