93 |
93 |
94 /** |
94 /** |
95 * Compares two real numbers of type float. |
95 * Compares two real numbers of type float. |
96 * @param f1 pointer to float one |
96 * @param f1 pointer to float one |
97 * @param f2 pointer to float two |
97 * @param f2 pointer to float two |
98 * @param if provided: a pointer to precision (default: 1e-6f) |
98 * @param data if provided: a pointer to precision (default: 1e-6f) |
99 * @return -1, if *f1 is less than *f2, 0 if both are equal, |
99 * @return -1, if *f1 is less than *f2, 0 if both are equal, |
100 * 1 if *f1 is greater than *f2 |
100 * 1 if *f1 is greater than *f2 |
101 */ |
101 */ |
102 |
102 |
103 int ucx_floatcmp(void *f1, void *f2, void *data); |
103 int ucx_floatcmp(void *f1, void *f2, void *data); |
104 |
104 |
105 /** |
105 /** |
106 * Compares two real numbers of type double. |
106 * Compares two real numbers of type double. |
107 * @param f1 pointer to double one |
107 * @param d1 pointer to double one |
108 * @param f2 pointer to double two |
108 * @param d2 pointer to double two |
109 * @param if provided: a pointer to precision (default: 1e-14) |
109 * @param data if provided: a pointer to precision (default: 1e-14) |
110 * @return -1, if *d1 is less than *d2, 0 if both are equal, |
110 * @return -1, if *d1 is less than *d2, 0 if both are equal, |
111 * 1 if *d1 is greater than *d2 |
111 * 1 if *d1 is greater than *d2 |
112 */ |
112 */ |
113 |
113 |
114 int ucx_doublecmp(void *d1, void *d2, void *data); |
114 int ucx_doublecmp(void *d1, void *d2, void *data); |