D-Programming-Language/dmd — pull request #3703 by ibuclaw (2014-06-29 10:23:49+00:00)
Title: Move CTFE paintFloatInt to Target::paintAsType

This code is compiler-implementation specific.

All floating point math in GDC is done using a synthetic type, one that can't be converted to/from native float/double, and certain one that can't be type-punned to/from native int/long.

To future proof this, one should really split this up as two functions, one to encode the fromVal into a char[] buffer, and another to interpret the char[] buffer as another type. This would be useful in performing CTFE paints between any scalar type, or even a static array type of the same size.