1 /* epsilon-equal.h: define an error resist compare. */ 2 3 #ifndef EPSILON_EQUAL_H 4 #define EPSILON_EQUAL_H 5 6 #include "types.h" 7 8 /* Says whether V1 and V2 are within REAL_EPSILON of each other. 9 Fixed-point arithmetic would be better, to guarantee machine 10 independence, but it's so much more painful to work with. The value 11 here is smaller than can be represented in either a `fix_word' or a 12 `scaled_num', so more precision than this will be lost when we 13 output, anyway. */ 14 extern at_bool epsilon_equal (at_real v1, at_real v2); 15 #define REAL_EPSILON 0.00001 16 17 #endif /* not EPSILON_EQUAL_H */ 18 19