petdance/scratch — Issue #318: fdiv_i_i_i and fdiv_i_i ops don't work correctly.
Author: petdance
Created: 2011-11-14 05:55:39+00:00
State: open
Labels: bug, core, Pri-normal, Sev-low

fdiv is documented to be flooring division: "The result is the floor() of the division i.e. the next whole integer towards -inf."
The num variants of fdiv correctly perform flooring division.

The int variants of fdiv floor the result of C integer division of the arguments, and C integer division truncates towards zero. Therefore, fdiv_i_i_i is currently equivalent to div_i_i_i.

Originally http://trac.parrot.org/parrot/ticket/1720