A related but not the same (mod) function:
module m;
initial begin
$display ("FL: 4/3 %0d", $floor(4/3));
$display ("FL: -4/3 %f", $floor(-4/3));
end
endmodule
Tools give me -1, whereas C/PY/Matlab give -2. As per LRM:
Quote:
Table 20-4—SystemVerilog to C real math function cross-listing
It should match C's floor. What am I missing please?
Thanks