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 0B43F594160; Mon, 21 Aug 2023 12:40:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0B43F594160 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692610852; bh=jgtZ1JWNRhcG26YyTfH0hFEAyiD23BL/sLKCcMvw8Ts=; 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=BzU9PwGIwQd8OLM1ug5kanBqdsrT9FzaCMRcDdwypfVjIugfgJvQnr1D2fjzOYzps B8NhXSP2fmvygk6nW5MZ27/frJYsE0YJtVKCSA4JBGjGSk9dQxxM4b3Sa/oA61Dw6f khsfe/fQqYhJosqgalLK6Z+LBbbcHs3+uz/Js/Ww= Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [95.163.41.78]) (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 6957B58E239 for ; Mon, 21 Aug 2023 12:40:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6957B58E239 Received: by smtp37.i.mail.ru with esmtpa (envelope-from ) id 1qY1P0-00GiUJ-19; Mon, 21 Aug 2023 12:40:50 +0300 Date: Mon, 21 Aug 2023 12:36:05 +0300 To: Maxim Kokryashkin 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: 4F1203BC0FB41BD93C8852532D76B9E3B40810D894915830A8FE19CFDA93E591182A05F5380850402C751D0B101C868E90FD04A829A8CBD7690EF45D8E0D803ABECB51E68DED65FF X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7EED5D2FAB4CEB1EDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378B6D775AC58C227F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8B596FBF0FDF0BB6266BDDAAC936AE540117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCA87D11164F1816E7A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751F2CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE140C956E756FBB7A2D242C3BD2E3F4C64AD6D5ED66289B523666184CF4C3C14F6136E347CC761E07725E5C173C3A84C39A1C9D3BA3303E89BA3038C0950A5D36B5C8C57E37DE458B330BD67F2E7D9AF16D1867E19FE14079C09775C1D3CA48CF17B107DEF921CE791DD303D21008E298D5E8D9A59859A8B636DA1BED736F932875ECD9A6C639B01B78DA827A17800CE7BEE702378D8A34C7731C566533BA786AA5CC5B56E945C8DA X-C1DE0DAB: 0D63561A33F958A52CAA303E87815EED676911FF2273385087106498244DF2DCF87CCE6106E1FC07E67D4AC08A07B9B01E44367C8E80A7B4CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADBF74143AD284FC7177DD89D51EBB7742424CF958EAFF5D571004E42C50DC4CA955A7F0CF078B5EC49A30900B95165D342F9EE325F82A28A895571CEF7D0B334D1845A363A7E847D81DAE2299F8877F8DF971D7909DB0311C1D7E09C32AA3244C5A1FE7C3A596DBE75407C49484A427A75595C85A795C7BAE85A42E4C463514DC5DA084F8E80FEBD3202CD0F03380D9577A83BD0C44CE203720ABEDE4BBDD9CDD X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHJI2DMjVra2xzsciQaHKfw== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A7692B6B51C17DC3989D90FD04A829A8CBD76CCF71F689FD47EEDEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF 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, Maxim! Thanks for the updates! Fixed your comment, see the iterative patch below. Branch is force-pushed. On 21.08.23, Maxim Kokryashkin wrote: > Hi, Sergey! > Thanks for the patch! > LGTM now, except for a single comment below. > Also, see my answers too. > > > > > > > > +-- -948388 ^ 3 = -0x1.7ad0e8ad7439dp+59. > > > Same as in the previous patch, we need some additinal commentary for > > > those magic numbers. > > > > See my answer in the previous reply. > I think the same commentary, as one I suggested in reply, will do. Added. =================================================================== diff --git a/test/tarantool-tests/lj-684-pow-inconsistencies.test.lua b/test/tarantool-tests/lj-684-pow-inconsistencies.test.lua index 10984d33..c0c63cce 100644 --- a/test/tarantool-tests/lj-684-pow-inconsistencies.test.lua +++ b/test/tarantool-tests/lj-684-pow-inconsistencies.test.lua @@ -70,6 +70,9 @@ test:samevalues(res, ('consistent results for folding 2921 ^ 0.5')) -- -948388 ^ 3 = -0x1.7ad0e8ad7439dp+59. res = {} +-- This number has no special meaning and is used as one that +-- gives different results when its power of 3 is obtained with +-- glibc's `pow()` and `x * x * x` operations. -- XXX: use local variable to prevent folding via parser. -- XXX: use stack slot out of trace to prevent constant folding. local corner_case_pow_3 = -948388 =================================================================== > > -- Best regards, Sergey Kaplun