﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4939	mod(x,y) with x < 0 computed incorrectly in algorithms	Francesco Casella	Martin Sjölund	"Please run this simple test case (also attached)
{{{
model TestMod
  Integer j, j_mod;
  Integer k, k_mod;
algorithm
  when initial() then
    j := -5;
    j_mod := mod(j,3);
  end when;
equation
    k = -5;
    k_mod = mod(k,3);
end TestMod;
}}}
{{{k_mod}}} is correcly computed in the equation section as 1, while {{{j_mod}}} is incorrectly computed in the algorithm section as -2. This is a bit weird, as the same Modelica function is used in both cases.

@lochel, could you have a quick look if this is an easy fix?"	defect	closed	high	1.13.0	Code Generation		fixed		Martin Sjölund
