moved compare_double to compare.h