Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120876 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 18560 invoked from network); 3 Aug 2023 08:28:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Aug 2023 08:28:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BB7BD18005D for ; Thu, 3 Aug 2023 01:28:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS20857 136.144.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from outbound4.mail.transip.nl (outbound4.mail.transip.nl [136.144.136.2]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Aug 2023 01:28:03 -0700 (PDT) Received: from submission13.mail.transip.nl (unknown [10.103.8.164]) by outbound4.mail.transip.nl (Postfix) with ESMTP id 4RGhmy3JQJztdQG for ; Thu, 3 Aug 2023 10:28:02 +0200 (CEST) Received: from [IPV6:2a02:a450:3eae:1:c0be:3dc5:95aa:830f] (2a02-a450-3eae-1-c0be-3dc5-95aa-830f.fixed6.kpn.net [IPv6:2a02:a450:3eae:1:c0be:3dc5:95aa:830f]) by submission13.mail.transip.nl (Postfix) with ESMTPA id 4RGhmx0mcNz1yBp for ; Thu, 3 Aug 2023 10:28:00 +0200 (CEST) Message-ID: <33580689-7f15-e8d4-b2b7-a62ee6926fdc@demon-angel.eu> Date: Thu, 3 Aug 2023 10:28:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: nl To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: ClueGetter at submission13.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=demon-angel.eu; t=1691051281; h=from:subject:to: references:in-reply-to:date:mime-version:content-type; bh=WeuAMObWPId79wvJOYopQ6F32Ln39vZSBVM+KkS134c=; b=VTqapvESDwmeE7ve5pNohrnecQc8AGx9eBO56mZgXLHv1w2GHKIxXQtIly8mqWE1qlISMf mmTfvCN1Kw+BFF5PnuP3BROc1QUmHsrTx8KKA0U/lvtegyFB6CVz0pzLqbeUQCu0ZL3KkN CnTH7Ft1laHvhkKL5wJiv0b5SNzW7TIWpTV0yf8eYjYGldU58KsW9i8B4Vs5u5msLXNGqg FVsfL6oeXZQ3ddAc5WqM7OOWgdqhHbVjJlMl9Bbd8kEGywOIcXbV03B+XEc2iTVFXEx0sd w4mBnyIhQaw187zeEiaHFqAB4jPYUFUdDkyZgk6MQZ+vZb+vbnQJNsPHzarRKA== X-Report-Abuse-To: abuse@transip.nl Subject: Re: [PHP-DEV] Introducing 2 new modes to round function From: mark@demon-angel.eu (Mark Baker) Once upon a many years ago: https://github.com/php/php-src/pull/1658 It will be nice to see it finally get and implementation On 21/07/2023 21:26, Jorg Sowa wrote: > Hello internals! > > I would like to propose introducing two new modes to the function > `round()`: PHP_ROUND_DOWN and PHP_ROUND_UP. > > Those modes are highly requested as you can see by the comments on round > documentation page. First comment mentioning about those modes has 309 > votes as of today. Introducing those 2 modes would be complementing to the > rounding in this function. > > Round documentation: https://www.php.net/manual/en/function.round.php > My implementation: https://github.com/php/php-src/pull/11741 > > I'm not sure if such minor improvement requires RFC, but as someone may > have some concerns I create this thread to get your feedback. > > Kind regards, > Jorg > -- Mark Baker