The issue is in the 'done case', the compiler doesn't actually emit code to do the calculation. The calculation is instead done at compile time, and a single constant is put in its place.
The compiler, unlike the EVM at runtime, does support decimal math.
Know the blockchain better through Blockchain Certification by Intellipaat.