-
div() expects integer arguments, and therefore any denominator less than 1.0 gets rounded to 0, hence doing a division by 0. Instead remainder() works on double values, and anyway we only needed the remainder. See gimp#6888. Thanks to Massimo for reporting the source of the issue.