When I used vyper-run on this code:
@public
def test() -> decimal:
return 5 / 2
I get the following output:
* Calling test()
- Returns:
'5'
- Logs:
When the expected result was 2.5 instead of 5.
After a few more tests with other numbers, it looks like the bug is that vyper-run prints out the original number before the division. So 7 / 3 returns 7. I am not sure yet if the problem is with vyper-run or Vyper itself.
There is a bug if the result is an int but is saved as a decimal.
For example, the same code as above but with 10 / 5 produces 2E-10. While it should either produce 2.0 or throw an error.

This a bug with the literal simplification.
@zaq1tomo, go for it!
Our approach was to evaluate the constants in Python and set them to one number in our generated code output. It should match the data types being used, so 5/2 should floor to 2 but convert(5/2, 'fixed168x10') should convert to 2.5
I found the problem, parsing the return type was not working properly for literals.
Most helpful comment
This a bug with the literal simplification.