Kaydet (Commit) 54ea2630 authored tarafından Luboš Luňák's avatar Luboš Luňák

fix opencl INTRATE

No idea why somebody thought pow() would be better than a mere division.
Without this the unittest fails because of a slightly different result.

Change-Id: Ibbde8b872049be310ac98389634aab6eab154ca6
Reviewed-on: https://gerrit.libreoffice.org/64229
Tested-by: Jenkins
Reviewed-by: 's avatarLuboš Luňák <l.lunak@collabora.com>
üst 62b0bcfd
......@@ -378,9 +378,8 @@ void OpINTRATE::GenSlidingWindowFunction(std::stringstream& ss,
}
}
ss << " int nNullDate = GetNullDate();\n";
ss << " tmp = arg3 * pow(arg2,-1) - 1.0;\n";
ss << " tmp = tmp * pow(GetYearDiff_new(nNullDate, (int)arg0,";
ss << " (int)arg1,(int)arg4),-1);\n";
ss << " tmp = ((arg3 / arg2) - 1) / GetYearDiff_new(nNullDate, (int)arg0,";
ss << " (int)arg1,(int)arg4);\n";
ss << " return tmp;\n";
ss << "}";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment