1.1 --- a/ucx/comparator.h Wed Feb 27 10:35:42 2013 +0100 1.2 +++ b/ucx/comparator.h Wed Feb 27 10:57:40 2013 +0100 1.3 @@ -38,6 +38,28 @@ 1.4 int ucx_intcmp(void *i1, void *i2, void *data); 1.5 1.6 /** 1.7 + * Compares two real numbers of type float. 1.8 + * @param f1 pointer to float one 1.9 + * @param f2 pointer to float two 1.10 + * @param if provided: a pointer to precision (default: 1e-6f) 1.11 + * @return -1, if *f1 is less than *f2, 0 if both are equal, 1.12 + * 1 if *f1 is greater than *f2 1.13 + */ 1.14 + 1.15 +int ucx_floatcmp(void *f1, void *f2, void *data); 1.16 + 1.17 +/** 1.18 + * Compares two real numbers of type double. 1.19 + * @param f1 pointer to double one 1.20 + * @param f2 pointer to double two 1.21 +* @param if provided: a pointer to precision (default: 1e-14) 1.22 + * @return -1, if *d1 is less than *d2, 0 if both are equal, 1.23 + * 1 if *d1 is greater than *d2 1.24 + */ 1.25 + 1.26 +int ucx_doublecmp(void *d1, void *d2, void *data); 1.27 + 1.28 +/** 1.29 * Compares two pointers. 1.30 * @param ptr1 pointer one 1.31 * @param ptr2 pointer two