Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128247 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 lists.php.net (Postfix) with ESMTPS id 6F7151A00BC for ; Mon, 28 Jul 2025 09:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753694920; bh=g1IeECMxAUMhIpsgveILLBoMPKMZ7S1yZOhSEJh7XzU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BpkAWRQGZyPWXKZosnABLoIJwN16ms3h96RraUw1t6PhXq4WXgYsNNfx4yfWYiYik dJtc7qWyWAgYWDLowR+5jUkJNoDOR/vmsRW/PC1+tOi3qbo9qeLH5t9Mu6obLOEsZt EeKXK/DVRyzL65bP+7DFm5Cdcr941GfozF1dSHnEWnP32gDH2Ia7wjf5zoObASmRM4 GeT5CmJYgcd0kaaAGmi25QSZxTnszb74E7LEPtwGkK7U6H3jZ/6PwkNTZY+J6Q7Jjq EvQd33XVnnRLng4COd7H05WPmps+JPgPvEsd6QiHSaaqGroJNgsziTXTQDafA0LglY +9W9upAj8yZmQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D950018007E for ; Mon, 28 Jul 2025 09:28:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) 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,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 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, 28 Jul 2025 09:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1753695019; bh=BNCEuibBstBDZO7V+F57J4YuDhfvQ+FyH9u6w0lQwMg=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=nykraVEDbK3Xy4taEsgwJrfyoq/Z1qYWjhBYGslvlnS31C0Tg0TCQFKwWBMmKtUZw domCGyCvx8OTKqIX9wRB1M6y/r4Y4FEtA/RGNOp6+ONo60xIiOeEGtPlV2ARAZMt/2 GV+GCgzjOnXEsarF1pLwDA+gXEukKNSzftYACqevOd89LXSba06X6S/dm03faElHT2 Y19TI2TMUIeEkf5y2kFcD9a1KNpvpy1/S/HdYwYJaLUtuebmQVvH89520jZfIsPfdj ItsDct6bueJLnwFxtzOWkQwzR3UjO78W+Njp8uVyv9xE4nzAi+VXK7Kd3mpSb1eEqC EyqHiYInRQ/9A== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Mon, 28 Jul 2025 11:30:19 +0200 To: "Rowan Tommins [IMSoP]" Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [DISCUSSION] Adding the "is_integer_safe()" function In-Reply-To: References: Message-ID: 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 Am 2025-07-26 15:45, schrieb Rowan Tommins [IMSoP]: > can_lossless_cast(2 ** 54) === false That one is incorrect, 2**54 *can* be exactly represented as a `float`. The magic 2**53 boundary just means that the difference between consecutive representable values becomes larger than `1`. See: https://float.exposed/0x4350000000000000 and try incrementing or decrementing the "Raw Decimal Integer Value". Best regards Tim Düsterhus