In Mathematics, a step function (also called as staircase function) is defined as a piecewise constant function, that has only a finite number of pieces.