Description
As stated - on integral to floating point conversion, loss of precision is suppressed and ignored.
To Reproduce
Assign an int value occupying more than 23 bits (on most platforms) to a float.
Expected behavior
Precision loss should be allowed (as is in the language type system). However, it should be possible to enforce strict no-precision-loss policy for integral to floating point conversions.
Description
As stated - on integral to floating point conversion, loss of precision is suppressed and ignored.
To Reproduce
Assign an
intvalue occupying more than 23 bits (on most platforms) to afloat.Expected behavior
Precision loss should be allowed (as is in the language type system). However, it should be possible to enforce strict no-precision-loss policy for integral to floating point conversions.