It works fine even for relatively complicated expression. If express contains integer number only, the result is integer too. A float number must stand as first. I can solve it by multiplying by 1.0, but I don’t like it. Instant calculation is useful, so I suggest modify behavior of Debug.
Code: Select all
Debug 5/2 + 1/3
Debug 5/2 + 1/3*1.0
Debug 5/2 + 1.0 *(1/3)
Debug (5/2 + 1/3)*1.0
Debug 1.0* (5/2 + 1/3)
Debug (5/2+5/2+5/2+5/2)*1.0
Debug 1.0*(5/2+5/2+5/2+5/2)
Debug 1.0*5/2 + (5/2+5/2+5/2)
Debug -5/3 + Log(2)
Debug Log(2) - 5/3