c-semantics
c-semantics copied to clipboard
Handling floating point
1.0f translates to Float(#"1e+00") instead of Float(#"1e+00f") Generally, account for both float and double constants.
To summarize, basically all three floating types are represented internally by 64-bit floats. What we need is:
- configuration settings for the mantissa and exponent size of each of the three floating point types (in settings.k)
- Updated fmin, fmax, etc based on the configuration settings
- Updated code representing floating point expressions to handle the correct precision of all values of floating type.
- Code to treat floating-point underflow as undefined behavior (ie if the result of computation is smaller than the smallest subnormal number)
Maybe some other stuff too, I'm not sure.