Skip to content

Commit 266ea26

Browse files
authored
Thought I would improve the code, added a comment instead (#7284)
1 parent 6e63f5b commit 266ea26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ bool within_int32_repres(double x) {
44
// N.B. (int)2147483647.99 is not undefined behaviour since s 6.3.1.4 of the C
55
// standard states that behaviour is undefined only if the integral part of a
66
// finite value of standard floating type cannot be represented.
7+
// Also, note that these are not the same values you would get from INT32_MAX and INT32_MIN
78
return R_FINITE(x) && x < 2147483648 && x > -2147483648;
89
}
910

0 commit comments

Comments
 (0)