Work with 0.0 instead of -1.0 for invalid output