fixed-point implementation