DRILL-799: Cast result of Math.pow() to int/ long before using it to adjust the scale of decimal value.