On Fri, Nov 24, 2017 at 5:25 AM, lkintact <[email protected]> wrote: > Type a large number, for example 999999999999999999999999. > Switch to Normal mode, put the cursor on the number and hit Ctrl-x. The > number changes to 18446744073709551614. (this seems to be intended, perhaps > gVim changes too large a number to the largest possible value for the type). > Hit Ctrl-x again, nothing happens, that is 18446744073709551614 isn't > reduced by 1, while expected. > Hit Ctrl-a. 18446744073709551614 changes to -18446744073709551615 (this > seems to be intended too). > Hit Ctrl-a again, -18446744073709551615 changes to -18446744073709551614 as > expected. > Hit Ctrl-a one more time, nothing happens, that is -18446744073709551614 > isn't increased by 1, while expected. > > Win 7 SP1, > gVim 8.0.1333 x86 >
I see the same on gvim 8.0.1333 with GTK2-Gnome GUI (x86_64) on openSUSE Linux 42.3. I think this is related to how Vim emulates NaN, INF and -INF for integer numbers, see the second half of the help text between |expr6| and |expr7|. I suppose it makes some sense that -INF + 1 == -INF. What in fact surprises me more is that +INF + 1 results apparently in -INF. Maybe a result of an uncaught arithmetic overflow somewhere. Best regards, Tony. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
