fixed for floating point and ZeroDivisionError