Thanks, that's ok for me. Notice that we're not dealing with a lot of complications that come with floating point numbers. For example, SM1-3 doesn't allow infinities or NaNs (AFAIU), so I'm not sure of what should happen if the dot folding results in one of those. However, most of the constant folding code doesn't care, so I'm ignoring the issue for the time being.
Also, we usually keep `switch` cases separated with newlines.