Closed ggxa closed 2 years ago
Data loss is always expected for floating point literals, since you are never forced to input only values that are exactly representable. So this fix is perfectly fine. Want to make a PR?
Could you please do it yourself. I don't want to deal with github. This is a throwaway account just to report some issues.
Also can you check my other bug report about loading zero to uint. A while ago a similar fix was applied for int, it should also be done for uint.
Thank you!
Thank you for the suggested fixes, your issues have been addressed.
The simpler you make it for me, the faster I can react; but you are of course free to suggest fixes like this.
Reduced reproduction code:
serialization.nim(284, 53) Error: for a 'var' type a variable needs to be passed; but 'BiggestFloat(result)' is immutable
Suggested fix:
The conversion from BiggestFloat which is float64 usually to smaller floats like float32 could result in loss of data but that is expected I guess.