Jannik Sinner won an almost impossible point against Tomas Machac in the quarter-final of the Miami Open.