* loosen some test threshold mainly for integer types * use relative error for floating points result * avoid division by zero by following the comment * fix the indentation