Floating Point in the Browser, Part 3: When x+y=x
https://randomascii.wordpress.com/2020/10/18/floating-point-in-the-browser-part-3-when-xyx/ [randomascii.wordpress.com]
2020-10-20 04:09
That is, if you add a small number to a large number then if the small number is “too small” then the large number may (in the default/sane round-to-nearest mode) stay at the same value.
Because of this the loop spins endlessly and the push command runs until the array hits the size limits. If there were no size limits then the push command would keep running until the entire machine ran out of memory, so, yay?