3 ms·
Yes.
by sanxiyn 12y ago
Yes.
- TazeTSchnitzel 12y agoNative integer overflow checks can only go so far, there, since there's no 52-bit integer type.
- sanxiyn 12y agoWhat? JavaScript engines check for 32-bit integer overflow and promote to double.
- kevingadd 12y agoIIRC v8 promotes to double at 31 bits. But yeah.
- gsnedders 12y agoYeah, V8 is a bit of an odd one out here. Everyone else just promotes once a signed 32-bit int overflows.
- mraleph 12y agoOn 64bit architectures V8 promotes at 32bits. (and if we talk about optimizing compilation things are getting more complicated as there int31, int32 and float64 can all coexist and you can have 31-bit integer stored in a float64 value - if operation was specialized for floating point values)