Finding slope and zero values