> On Jul 24, 2018, at 13:02, Raphaël Berbain <raphael.berbain@gmail.com> wrote:
> I'd expect b1 = b2 = 2. What am I missing?
The problem appears to be due to rounding during the intermediate calculations. In compute_bucket() in numeric.c:
div_var(&operand_var, &bound1_var, result_var,
select_div_scale(&operand_var, &bound1_var), true);
... produces 0.99999999999999999999 for that particular value, instead of 1, and the subsequent +1 and FLOOR() result
in1 instead of 2.
--
-- Christophe Pettus
xof@thebuild.com