We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 892b928 commit a39c00fCopy full SHA for a39c00f
src/expressions/operator-expr.md
@@ -366,9 +366,8 @@ same trait object.
366
* zero-extend if the source is unsigned
367
* sign-extend if the source is signed
368
* Casting from a float to an integer will round the float towards zero
369
- * **[NOTE: currently this will cause Undefined Behavior if the rounded
370
- value cannot be represented by the target integer type][float-int]**.
371
- This includes Inf and NaN. This is a bug and will be fixed.
+ * `NaN` will return `0` and values outside the integer range will
+ saturate to the integer minimum/maximum.
372
* Casting from an integer to float will produce the closest possible float \*
373
* if necessary, rounding is according to `roundTiesToEven` mode \*\*\*
374
* on overflow, infinity (of the same sign as the input) is produced
0 commit comments