Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123478 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 006841A009C for ; Fri, 31 May 2024 17:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717175809; bh=gtLhQ1+JBN+a8zz7oL0HrgZXbABNgHrD3yPAI4DCDFY=; h=In-Reply-To:References:Date:From:To:Subject:From; b=NgdYKkv3OZhgZgX/UtB3y564ystVB9ASUJ2GHrTeWqUu+YDnHlYbuEsYUo5weWhf3 /c4zVKmBL1Yb7Mc0phokIHNU3hLjMPcX1MRSGN6zx4dvRGkTpBROXD222o9zR0ASUH 18NWgW5640WhJcO0HLfneg3kEP/eIfPR6qNqMI7Lu20MJBqKm+nldMoauDc95pvpSl yQF3NrkE77/zYd0n9iuRvda3kwXFqyILUyfeKd8xnKHJEX7fapk/3cBhiPHt21R3MX XGiirw9lWI5pDtNuVjgTqM2ABSuhxtECp96w7hazEVTQrf/GFKZhjHSmVjA3j8L8LA 0QB8fM4bcSLKQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9B09C1808AF for ; Fri, 31 May 2024 17:16:48 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE,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 fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) (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 ; Fri, 31 May 2024 17:16:47 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id F181011400F6 for ; Fri, 31 May 2024 13:15:45 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Fri, 31 May 2024 13:15:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1717175745; x= 1717262145; bh=dQKW/VulRyscGqEBfbDaL2udAlSfRDyidu8RHwvGQA0=; b=Z qRpjCcKOkQlw9Bz8AfM7JA4yCvm6vL9z0REGZrA5deQlQMVrZaaa+FIlNEIqy0KY x7JvEpsrbci4Rj/alM+KFOfZHsN1qyr+n8zZjjCK9z/ruCAyBdeLF6ldFabfs6UX 7OoeF/qkM2QfgBDOFIJXbGTuGoNMUjxKN6eyhqSF3e9pE6LALFgAId4jqtfVxIOU fEoSg+eGCNE2Wc3mYm6YZ7ETIcebenCjQUAvtDQeEhMEfSMlZgFulSWpEjshi3r5 vAWh+W5j8oS3hi0h/3JlS/viQgkSb3bjdo/XKwoG1z+bFmA1ijW7X7+/25S8AOp1 cWLf8Z8U9bEZaN6rPLUvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1717175745; x=1717262145; bh=dQKW/VulRyscGqEBfbDaL2udAlSf RDyidu8RHwvGQA0=; b=ANINAROZfPEqirFpEO2GiVaSXKHHzlIUnMlVvPTJFbHI YxnE9E7LlBM1y5dwQOiSgTcwdyZkFb+goQ6KQ34sTLK00XwSX0lX7EfOSMoRR+8l C38DO19r+TvR0P0bEZda6sU/O2pFOVtyrZnldXnK+TYaNkukzzL/yTGeq1WAG/74 r16OTtI4cSo6blQxVAmD7oW9bX/7ulwbPv1KO0LhJsEyR4a0eekbMmt6Ayyq0qCw Ga0Hrmn+YZM2ttNn80La0VzvnaoIvEe1ViwYHnu3EQXPYjqZe85H86JbN48AXUJ2 EelrR2XilfxiNnpp2ihy3g5jS0RqYSklnmV1t+yHpQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekiedguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefg ffekudevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B34F51700096; Fri, 31 May 2024 13:15:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-491-g033e30d24-fm-20240520.001-g033e30d2 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <73ae49a3-473a-46f2-add6-164b0a01e357@app.fastmail.com> In-Reply-To: References: <81CBE5A8-9FAF-40DA-8EAB-9F19C2278E75@sakiot.com> Date: Fri, 31 May 2024 17:15:24 +0000 To: "php internals" Subject: Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum Content-Type: text/plain From: larry@garfieldtech.com ("Larry Garfield") On Fri, May 31, 2024, at 4:41 PM, Jorg Sowa wrote: > Hey Saki, > I like this change. When I was implementing additional rounding modes > for the next PHP version I was initially struggling with the naming and > this change will be helpful. > > I have only one concern about the names `NegativeInfinity` and > `PositiveInfinity`. They may be too formal from the user's perspective. > As we already have functions `ceil` and `floor` it's more intuitive for > developers to understand the logic of ceiling and floor rounding. > > But if voters will prefer those terms then it makes sense to change the > constants implemented in PHP 8.4 (and thus not released yet) from > `PHP_ROUND_(CEILING|FLOOR)` to > `PHP_ROUND_(POSITIVE_INFINITY|NEGATIVE_INFINITY)` for the sake of > consistency. > > Kind regards, > Jorg I was confused by those as well. It's not obvious to me what those even do. Do they mean "away from 0"? If not, then I have no clue what they are. :-) --Larry Garfield