[tarantool-patches] Re: [PATCH v1 1/1] lua: fix strange behaviour of tonumber64

  • From: Alexander Turenko <alexander.turenko@xxxxxxxxxxxxx>
  • To: Kirill Shcherbatov <kshcherbatov@xxxxxxxxxxxxx>
  • Date: Tue, 17 Jul 2018 14:27:46 +0300

+-- gh-3466: Strange behaviour of tonumber64 function
+--
+tostring(tonumber64('18446744073709551615')) == '18446744073709551615ULL'
+tonumber64('18446744073709551616') == nil
+tostring(tonumber64('-9223372036854775808')) == '-9223372036854775808LL'

2. Where is a test for another corner case? I mean INT64_MAX.


I also propose to test zero.

WBR, Alexander Turenko.

Other related posts: