# Minimize with conditions on Integers does not find a correct answer

I want to find the minimum m which satisfies conditions as below:

Minimize[{m, m > 0 && Mod[m 3.1, 0.5] == 0}, m, Integers]
(* {1., {m -> 1}} *)


Obviously, the answer is m=5, however, Mathematica11.1 does not find the answer. How can I instruct MM to find the correct answer?

• Mathematica v12.2. gives an error message NMinimize::nosat: Obtained solution does not satisfy the following constraints within Tolerance -> 0.001: {-Mod[3.1 m,0.5]==0}. – Ulrich Neumann Jun 10 at 6:20

Minimize[{m, m > 0 && 31/10 m == 1/2 k && k ∈ Integers}, {m, k}, Integers]

{5, {m -> 5, k -> 31}}
Minimize[{m, m > 0 && 3.1 m == .5 k // Rationalize} , {m,    k}, Integers]

• +1 Note that k \[Element] Integers is redundant – Bob Hanlon Jun 9 at 2:04
• @BobHanlon Thanks! I forgot that the last  Integers restrict {m,k} to Integers – cvgmt Jun 9 at 2:09
• I understand the solution. Why does the Mod or the Minimize` not work for decimal representations? – Taiki Bessho Jun 9 at 2:18