Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120976 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55668 invoked from network); 3 Sep 2023 15:51:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Sep 2023 15:51:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 45E76180341 for ; Sun, 3 Sep 2023 08:51:05 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-yb1-f178.google.com (mail-yb1-f178.google.com [209.85.219.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 3 Sep 2023 08:51:04 -0700 (PDT) Received: by mail-yb1-f178.google.com with SMTP id 3f1490d57ef6-d78328bc2abso621589276.2 for ; Sun, 03 Sep 2023 08:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693756264; x=1694361064; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jKk+E9f44F36HteNjP0o6HYpXNt4iRHfK3jG3m4m3Ok=; b=EVxMpu6wzlFv0i+cIuHVpHbVnV9m34iJ+FoCTgTKk1leAnRcwECt6AWfQWyTGGwKlP j0x+4rrNOgkKlmJ7epeuHtJxsGJ/cpNoUGRaZRtuLeZvt3vkfMhiTPG/gYRLwl4S/OZH lZQgizkxSlrL6gNJz19XOchVYPzo8vfW6KRvq/egPNOQQE2i+8Z71/dmHx/daBB4quLP YQ1nJBEZ25h5WZfiAzc3JLX4Ln+vMrug3ZJMUKYyrfNiYZQEwpd1kr8VnbnD4YVtiucB sd/lOWI/Qx+cb6WcfzCPDaqSypoWiTukg/JRBAsbSAEmRas/6XwLYiLBewSrUqfOieeh zPiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693756264; x=1694361064; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jKk+E9f44F36HteNjP0o6HYpXNt4iRHfK3jG3m4m3Ok=; b=LuhXWqXucyJ20mTDFMdZP8m1SEJsdZSSN1XLiIls9pVr/uMjIfoCFS3e4q6VlIhwIU V2xALV+f2iEnkIdhafopkbphMDcfSKg/UCoSrMOdxaL6iwmXWYBj/OXSB7pd1qWb2Ns8 R61n/yKrZbC6LRRQ4DPKQ0x5uXbyNT/W5iVo525uGdmnkkr6MMZKcmgG+nN5HOaaSNNc SAxySdzZkUACHizG2g8FogrHBtG0FYAt/GtAsTzW5KMYR24zolHTxI4qDvO8x/jYLAX3 kENoyZlsq6ynewJuuYXe/9XAFGtUzkPQXGAv4cq8CwYkmSFfsmijiw0XAXyakPvOeDOo B7+g== X-Gm-Message-State: AOJu0YwuZUyoQaZgQ5s2B5G7g9Qg97OWn8FVthAGSUGoS01jA1CHwI6V bypU7WsfD4ymMzV+mbl7/0aB6sBjfD5hUzS0/3g= X-Google-Smtp-Source: AGHT+IFzIvqck+dG5rQV0zqEzOs3F/gDIuiKlJonZzlrzSjeHERmdxZIfihQXRTvW7mG1qGiqhb3mL+bNWPSNTXww3E= X-Received: by 2002:a25:cc02:0:b0:ba8:2e05:3e9c with SMTP id l2-20020a25cc02000000b00ba82e053e9cmr9618496ybf.24.1693756263912; Sun, 03 Sep 2023 08:51:03 -0700 (PDT) MIME-Version: 1.0 References: <7f23f0ac-bba6-5997-b737-2a252205cf85@bastelstu.be> In-Reply-To: <7f23f0ac-bba6-5997-b737-2a252205cf85@bastelstu.be> Date: Sun, 3 Sep 2023 18:50:48 +0300 Message-ID: To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: Jorg Sowa , PHP internals Content-Type: multipart/alternative; boundary="000000000000725b360604765ce3" Subject: Re: [PHP-DEV] [RFC] [Discussion] Add 4 new rounding modes to round() function From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000725b360604765ce3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi! On Sun, Sep 3, 2023 at 3:14=E2=80=AFPM Tim D=C3=BCsterhus wrote: > > The RFC mentions already has a section with regard to naming: > > > Why not the names PHP_ROUND_UP and PHP_ROUND_DOWN > > I generally agree with the argument in favor of the names you've chosen. > However they are inconsistent with the existing 'PHP_ROUND_HALF_UP' / > DOWN constants. > > I don't want to create extra work for you, but I wonder if additionally > one of the following should be done: > > - Creating PHP_ROUND_HALF_AWAY_FROM_ZERO as an alias for > PHP_ROUND_HALF_UP (and likewise for HALF_DOWN). > > I believe consistency is important and using UP for "away from zero" and DOWN for "towards zero" sounds good to me. That was so far used consistently everywhere, as far as I'm aware. Documentation is very clear about what they mean, and you can always think that both positive infinity and negative infinity are up while zero is down= . Yes, we can have some extra constants for the four ones that contain "up" or "down" with "away from zero" and "towards zero", but I find it unnecessary. Regards, Alex --000000000000725b360604765ce3--