On Monday, 14 October 2024 at 15:59:07 UTC, vinoB wrote:
Hi All,Request your help in understanding why the below code is producing different outputs, code 1 output: 4294966806, code 2/3 output: 50331648, and which one is the correct output.[...]
`cast(unint)` of a `float` does truncation. So none of your version is correct. See https://dlang.org/spec/expression.html#cast_floating, paragraph 2.