From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 662E558E203; Mon, 21 Aug 2023 11:21:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 662E558E203 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692606079; bh=Yderp5yE9pxCc1yW7aSWBm1l1aILtf7JvD9jcShhbx4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=tPHkMlfdA0p4MxOpw01PuL7w8fO/6eE3PoqLG4qA0GyTIzl8RBK5ZeZzIgP3j3swg RPBNWiBt87BfPTdp87qoBdeclAxE7+HXVvRYB5m4M3bd5qYLpCAoibEfJjYMtZfPKe ghaMwKTZ/C23NpJ0wnJP1RvW9rOhvnMnSguFj3Dw= Received: from smtp38.i.mail.ru (smtp38.i.mail.ru [95.163.41.79]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 90B75572182 for ; Mon, 21 Aug 2023 11:21:18 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 90B75572182 Received: by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1qY0A0-003hH2-2p; Mon, 21 Aug 2023 11:21:17 +0300 Date: Mon, 21 Aug 2023 11:16:32 +0300 To: Sergey Bronnikov Message-ID: References: <3d4ed7eb3db111ca1571688b281c560bd7a0f674.1692089299.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD93C8852532D76B9E3B62DC7F09619FD73B4ABEF74D25B7E0A182A05F538085040779F543A885C42C5D56209C98651753DAF7EFCB5C9A26C3405308F7BC51464A3 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70A10A23A3B64B805EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373D58C44ED3182E498638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D88D29E05AC7B0C767CC5884ADCDD64700117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF070A1BC70AFFF2BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE140C956E756FBB7AC766E17BBE5724E9D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE32A336C651863509103F1AB874ED89028C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C2FFDA4F57982C5F42E808ACE2090B5E1725E5C173C3A84C37EF884183F8E4D67089D37D7C0E48F6C8AA50765F79006376A91CFDE938F542CEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A51F1F39108E3DB2F6B6D5CD2EF9F0E74F897F5DAB0EDFE483F87CCE6106E1FC07E67D4AC08A07B9B00A6B3CD6EB70C818BDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D341E08D7EE1804B7630E06E14B4B632F09F134B27AEC8257668047A06DC723EE469B3ADB60A5D39D981D7E09C32AA3244C4BA2ACAEFBED8F84BB6D765A420901998894E9C85370243E85A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHJI2DMjVra1VUJ7EPB4G0A== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A76983691CFA5FC0FB5FD56209C98651753D8D2B58C568460B73DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 5/5] Revert to trival pow() optimizations to prevent inaccuracies. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the review! Fixed your comments and force-pushed the branch. On 18.08.23, Sergey Bronnikov wrote: > Hi, Sergey > > > Thanks for the patch! > > typo in subj: trival -> trivial, however seems it is not fixable because > a part of original commit > > LGTM > > > On 8/15/23 12:36, Sergey Kaplun wrote: > > From: Mike Pall > > > > (cherry-picked from commit 96d6d5032098ea9f0002165394a8774dcaa0c0ce) > > > > This patch fixes different misbehaviour between JIT-compiled code and > typo: misbehaviour -> misbehaviours Fixed. > > the interpreter for power operator with the following ways: > > * Drop folding optimizations for base ^ n => base * base ..., as far as > > pow(base, n) isn't interchangeable with just multiplicity of numbers > > and depends on the implementation. > > * Since the internal power function is inaccurate for very big or small > > powers, it is dropped, and `pow()` from the standard library is used > > instead. To save consistency between JIT behaviour and the VM > > narrowing optimization is dropped, and only trivial folding > > optimizations are used. Also, `math_extern2` version with two > > parameters is dropped, since it's no more used. > > > > Also, this fixes failures of the [220/502] lib/string/format/num.lua > > test [1] from LuaJIT-test suite. > > > > [1]: https://www.exploringbinary.com/incorrect-floating-point-to-decimal-conversions/ > > > > Sergey Kaplun: > > * added the description and the test for the problem > > > > Part of tarantool/tarantool#8825 > > --- > > return base ^ power -- Best regards, Sergey Kaplun