Use a custom struct for storing comparison values rather than casting (or, rather, trying to cast) everything to float64.