Piecewise Functions
The piecewise functions are functions defined by different criteria according to the intervals being considered.


Floor Function
The floor function or greatest integer function gives the largest integer less than or equal to x.
![]()
| x | 0 | 0.5 | 0.9 | 1 | 1.5 | 1.9 | 2 |
| 0 | 0 | 0 | 1 | 1 | 1 | 2 |

Ceiling Function
The ceiling function or least integer function gives the smallest integer greater than or equal to x.
![]()
| x | 0 | 0.5 | 0.9 | 1 | 1.5 | 1.9 | 2 |
| 1 | 1 | 1 | 2 | 2 | 2 | 3 |

Fractional Part Function
![]()
![]()
| x | 0 | 0.5 | 0.9 | 1 | 1.5 | 1.9 | 2 |
|---|---|---|---|---|---|---|---|
| 0 | 0.5 | 0.9 | 0 | 0.5 | 0.9 | 0 |

Sign Function
y = sgn(x)

