Replace linear interpolation with manual index reduction