Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114062 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 79209 invoked from network); 17 Apr 2021 14:42:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Apr 2021 14:42:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7EDE21804E2 for ; Sat, 17 Apr 2021 07:44:07 -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 autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 17 Apr 2021 07:44:06 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id z13so32181590lfd.9 for ; Sat, 17 Apr 2021 07:44:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vOX5Ye7Ok8nBpOGwmoZtGristghNp5othRxUzKvMTj8=; b=h2D2WhlivFdngW3hPddcTk/BOa8yzW7Xv9IHKkbP1sVoc9WqzIO/t7IxBHQf376Zx6 mfEZcpoXQXG6KLUG36FMDmkli+fw2RcrWVJxl6RtyB5i0T9SML7OUb/BZ/C/PmhHygmz IXknrU+c74WGhgqTrgUs5zntNLuhiPSj+7e4z3DERHI1ZuNcYs4NzNOOoGnWQX3j5Y5Q 2uICduGGvIJOi8ESm+PI4CRKAlF5yzfevJmV0KfzJgutS7mXK5qMlKGEWuaclN+2SvKT lwiYKrKkMiMDViJOYGMkt5VGHmPKqX1UsP+yR0DEON5cHMnd2N0F1bqg7kXWCeTpZ8iV 5YXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vOX5Ye7Ok8nBpOGwmoZtGristghNp5othRxUzKvMTj8=; b=bsd16U+RHNR0OssSZSO0fmJv8YsKD+SAWxj9KwVjJ44phUOK3UW9jrviSUteSoyTfN t90I/G8zcGH9rqEoec4gndZ5ppzUKbhuCeNsGD5RIPTWxTNr60YSJmRuftwjSN00n7Li a/UuT+SIXVtxbC0LOtuI24dsKS0E3A97ZtAyNIvv4JugpXdkCJCUoEO4rjGn1wrIGwx9 sZcSOG3d6xtejM07G9u36OeoWQR686NulBnNi8vGF/fRgrOxEJlGy+4pByhfLepcVJpt 1nVz6Kj7msfpnMxaLHx2K6dKBlKn3WDkgbbHs4AsIvK1ZMX+4Sa7g18OUHpTWLS8tSpg B3Bw== X-Gm-Message-State: AOAM532uCnejelBVPkYryVw565gpruYloNGk4M3/3kIu8jRWVbeOte0S Cyw/NxSOfF57aFh9s0eKdnpXQX0ir9xTjsBH3+A= X-Google-Smtp-Source: ABdhPJy4XO5OOa3pf3d3ydWlvwqojzjQXTFD9hv6FYVIQ9libqmTVXzcuHlaw96eHAQvh2vjGLm1KvZzoWCiAZXlhZQ= X-Received: by 2002:a05:6512:1105:: with SMTP id l5mr6098200lfg.223.1618670644649; Sat, 17 Apr 2021 07:44:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 17 Apr 2021 16:43:48 +0200 Message-ID: To: Hans Henrik Bergan Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000c8634d05c02c206f" Subject: Re: [PHP-DEV] [VOTE] Deprecate implicit non-integer-compatible float to int conversions From: nikita.ppv@gmail.com (Nikita Popov) --000000000000c8634d05c02c206f Content-Type: text/plain; charset="UTF-8" On Sat, Apr 17, 2021 at 4:30 PM Hans Henrik Bergan wrote: > just want to double check, 1.000000000000009 will then be an incompatible > cast to int(1), right? because the 0.000000000000009 will be lost? > That's right. Something to keep in mind is that your example could have just as well been 0.9999999999999999 -- which is going to be 0 when cast to an integer, not 1. A "negligible" difference of 10^-16 in a float can easily become a difference of 1 when interpreted as an integer. Nikita > On Wed, 14 Apr 2021 at 13:41, G. P. B. wrote: > > > On Thu, 1 Apr 2021 at 12:39, G. P. B. wrote: > > > > > Hello internals, > > > > > > It's been a couple of weeks and no further comments have been made as > > such > > > voting is now open: > > > > > > https://wiki.php.net/rfc/implicit-float-int-deprecate > > > > > > It will run for two weeks until the 14th of April 2021. > > > > > > Best regards, > > > > > > George P. Banyard > > > > > > > I'm happy to announce that this RFC has been unanimously approved with 29 > > votes in favor and 0 against. > > > > Best regards, > > > > George P. Banyard > > > --000000000000c8634d05c02c206f--