Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121613 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53191 invoked from network); 7 Nov 2023 23:58:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Nov 2023 23:58:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EAA80180504 for ; Tue, 7 Nov 2023 15:58:29 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 7 Nov 2023 15:58:29 -0800 (PST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1c9b7c234a7so57364605ad.3 for ; Tue, 07 Nov 2023 15:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wikimedia.org; s=google; t=1699401507; x=1700006307; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=eTar4YBq2uvErkiA8w7rR5eNkUF8oKWMlXsfuI0qbF4=; b=O2l73dqkO0dIbtCZTV3hc/CKuwgWtInUQ7lql4xujFVkhoJ06HoeDTzksU7emQBRRI 1SuAxe7AHpmLXbYk3Kk+lYz4kII2Itv0sXh7AAfzFWkSUFI3UM1oii7PJeniLiUT+20a Ra6KY+JnkNGwhF7ky8tyqRyg/ID7Y3K/p+Hz8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699401507; x=1700006307; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eTar4YBq2uvErkiA8w7rR5eNkUF8oKWMlXsfuI0qbF4=; b=ia33V8WIWFOa4RUKaLCSi7u0llqwVZVQ/RTkE1Ms0xJ13ToTIJvnLF6uS/Pdke8chb aSS63qgJMFuLwAc1wEWhGR5REw/ztyUbsWOLSxUiLG9Uc1EFHt26X+rWXUOpuYKOFB3F tIlzfEgfyaTt8IbTYZnL8/gqjlknO7KkD0e/JorQjKnolf733lZAq90vRpFHm65Vh3/D h+UQqpQIWb6JcsTTX0Yt3m92JvAZNXSPHPp4P+bS8PBYO0RtNacrYSYR9kvtqbC9Eyd8 hBlWYuaImCHaiiUNbroJhkkSFwxRWPkLRPA/SYyRtOxJFixJUEjja1NEZS6qoBPpu+O8 GHmA== X-Gm-Message-State: AOJu0YyamLo5i//eiouj1P+XsXO0t+2n9/5xGoc/nip3i8m6bIG3fJjo is1IPlZ8oOAK2GZ6heKkAjWkP3zDBTNcFrTuDfk= X-Google-Smtp-Source: AGHT+IED/cArIZ7XbCkzRLRBvkRTM1AyBYDaV6Q7pzuYRk9pwap1gIsotAwmTqw9W0ISPUA/OblJLA== X-Received: by 2002:a17:903:2311:b0:1cc:3b86:cfc5 with SMTP id d17-20020a170903231100b001cc3b86cfc5mr670680plh.4.1699401507489; Tue, 07 Nov 2023 15:58:27 -0800 (PST) Received: from [10.1.1.45] (124-168-50-135.dyn.iinet.net.au. [124.168.50.135]) by smtp.gmail.com with ESMTPSA id c10-20020a170902848a00b001ca2484e87asm360320plo.262.2023.11.07.15.58.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Nov 2023 15:58:26 -0800 (PST) Message-ID: <65ef661f-9fab-494a-9885-0a07c78c17cf@wikimedia.org> Date: Wed, 8 Nov 2023 10:58:22 +1100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: internals@lists.php.net References: <095E59EE-173A-4114-AD3F-4B830CD2E295@sakiot.com> <2BD1AE90-F082-41AB-8F5E-7F5257142874@sakiot.com> In-Reply-To: <2BD1AE90-F082-41AB-8F5E-7F5257142874@sakiot.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [Discussion] Change the edge case of round() From: tstarling@wikimedia.org (Tim Starling) On 8/11/23 03:06, Saki Takamachi wrote: > I have added as much of the rationale for the changes as I can think of to the RFC. I would be happy if you could see it again. Thanks for the detailed RFC and the PR. I reviewed the RFC and the PR. I would vote in favour of this change. I look forward to seeing a PR for the manual which will better explain the limitations of decimal rounding of a binary floating point number. The current manual entry for round() makes it sound as if it will magically always work. I think, most often, round() is done on the result of some calculation, not on decimal literals. The previous implementation seems to prioritize rounding of decimal literals over correct rounding of the actual value. -- Tim Starling