Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123496 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id CCC861A009C for ; Mon, 3 Jun 2024 17:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717437510; bh=V3kCgfWvX2R9kepAopScvwi0uz5iAoORagRCgirndnU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kT6IC0L6omSQTw98Rmuk+6vGaJ2KkiiMWllc3phrvn8+YniMzG76/M/STndmO7BFd b08OWafsLbFJogN4n55JkhyjL7NGdE/PNZrKa+1Ey+TixhIa8c6YK5Js4wEvWZ5wgJ wgZjykfGansZQDCd2dfWZIoX7uP1s+yqhaZ3C8r69csr00oXnO7JIVRo4i7Qr8QNNy zwEIx869AtaFl2ySFLqUfMcKZhzSeAlmid7CsGAFycYDuRxTP0u7Lsk+bEIS9QkuqD BvOElIl5UGUxV7gdS/xGJHhZSQg0nNy4a+lyr8+8MvsSdB7KDInque2XLgWIu63HNy AoyR7Xj5SpFHQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 648EC180599 for ; Mon, 3 Jun 2024 17:58:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 3 Jun 2024 17:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1717437444; bh=eQhOrG/PMUq1qz6Q3fezyakvjPmFkpLKTAvTdBN889Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=fYQoChMYxjrmlEtekn4LItSe5hyy/dAjF91zvqejK7ChyXqbnyP9o/S0CdS0o8p+f EvQYqUTwF9E/Tcf5ZKBe4N+5X9g7MP211wlK4x86YyQtSLoOhEXlWZkt1/cenehITY VKSRF65VzrIgAreomD5uKmSaMU1QSdOpcX24fulo6f/pn9AZXGA5yKGy7H2HeuV+Tz yPoVeXsbgEziCSeXNpAoItUtYPOK35J7BoAonwmcUyR9a9xl1sENzjbzMTzzkEXhji TTz7U0wgIR0ouhOzqF0FDfAmn6FRwV9tmCJD9m0WWAEf0h8XUJnBvWYF8OFQFQkE/K AajfPko2y7vsQ== Message-ID: <50e27d08-48d0-42e3-9abc-f5830264d75f@bastelstu.be> Date: Mon, 3 Jun 2024 19:57:23 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum To: Jordan LeDoux , Jorg Sowa Cc: "Gina P. Banyard" , Larry Garfield , php internals References: <81CBE5A8-9FAF-40DA-8EAB-9F19C2278E75@sakiot.com> <73ae49a3-473a-46f2-add6-164b0a01e357@app.fastmail.com> <5iUDJtfp_0xWjhfj9MpeJhmZz5awy0RyBF3udkM1TjF5HRfbMKoZrqVNJJWM_g07J1oLDZxsJh_6WbGEaqdNj6ZiE96SjLhfv_r62YTMiRo=@gpb.moe> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 6/3/24 19:02, Jordan LeDoux wrote: > If the behavior of that mode is to ALWAYS round regardless of the value of > the remainder, then it should remain ceil IMO. It's a pretty well > understood behavior in many programming languages. However, > "HALF_TOWARDS_POSITIVE_INFINITY" is a different behavior, and should not be > called ceil. There's already `HalfAwayFromZero` + `AwayFromZero` as companion modes. It would make sense to me to also make it `PositiveInfinity` + `HalfPositiveInfinity` [1] instead of `Ceil` + `HalfPositiveInfinity`, which are appear to be unrelated based on their naming. That would make it clear that those two are closely related and also that all the modes starting with 'Half' would be the ones that are only relevant if the last digit is 5, whereas the others act unconditionally. Best regards Tim Düsterhus [1] Possibly with an 'Towards' inserted before the Negative/Positive.