[Libre-soc-bugs] [Bug 676] FORTRAN MAXLOC SVP64 example

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Nov 16 22:21:12 GMT 2023


--- Comment #21 from Jacob Lifshay <programmerjake at gmail.com> ---
i noticed that changing the initial value of m to 0 instead of INT_MIN is
incorrect, since the algorithm uses signed integers. m starting at 0 (or
actually any int at all) is incorrect since the algorithm ignores all array
elements <= m, thereby giving the wrong answer for input [-5, -7, -6] or even
[-1, 0, -2] -- both of those return -1 even though the correct answer is 0 and
1 respectively.


You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list