Update casts.md

casting inf and -inf to integer
pull/256/head
edgeone89 4 years ago committed by GitHub
parent 1713e9fe80
commit 1786369160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,6 +56,8 @@ For numeric casts, there are quite a few cases to consider:
* floats that are too big turn into the largest possible integer
* floats that are too small produce the smallest possible integer
* NaN produces zero
* inf produces largest possible integer
* -inf produces smallest possible integer
* casting from an integer to float will produce the floating point
representation of the integer, rounded if necessary (rounding to
nearest, ties to even)

Loading…
Cancel
Save