The product * with int64 and uint64 integers > 2^52 is not reliable
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
// with int64()
// ------------
--> i = (int64(2)^62)+[1 56]
i =
4611686018427387905 4611686018427387960
--> int64(ones(2,1)) * i // KO
ans =
4611686018427387904 4611686018427387904
4611686018427387904 4611686018427387904
// with uint64()
// -------------
--> i = (uint64(2)^62)+[1 56]
i =
4611686018427387905 4611686018427387960
--> uint64(ones(2,1)) * i // KO
ans =
4611686018427387904 4611686018427387904
4611686018427387904 4611686018427387904
ERROR LOG:
----------
none. Wrong results
HOW TO REPRODUCE THE BUG:
-------------------------
i = (int64(2)^62)+[1 56]
r = int64(ones(2,1)) * i;
and(r(1,:)==i)
i = (uint64(2)^62)+[1 56]
r = uint64(ones(2,1)) * i;
and(r(1,:)==i)