Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121080 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97129 invoked from network); 17 Sep 2023 17:32:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Sep 2023 17:32:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9613F1804B0 for ; Sun, 17 Sep 2023 10:32:33 -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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS9370 160.16.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail.sakiot.com (mail.sakiot.com [160.16.227.216]) (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, 17 Sep 2023 10:32:32 -0700 (PDT) Received: from smtpclient.apple (softbank060067217005.bbtec.net [60.67.217.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.sakiot.com (Postfix) with ESMTPSA id DCA99401D1 for ; Mon, 18 Sep 2023 02:32:29 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sakiot.com; s=default; t=1694971949; bh=dcRZ4R9U+QPh8Ys2Lr6Sq90IdZo38rMjB9YMKnBgTw8=; h=From:Subject:Date:To:From; b=g8KmbJIL5a+XJuZUKINo92wVReMFoq+qYgwGdKtWisK1LfQN/eWv2xSa1SSIgLvt7 Jom5+JNMKhgdXJY4VA11HCFa9n+Iv/Ki2SoyObJi7yLuPxSFsiHiqPsrXjVFdMIu6C FfqR5AUuthu0njGad7l4VztQ26YeNgzxrhw5K7rM= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Message-ID: <002615C1-4F70-4B5A-8649-3B7A55B00B69@sakiot.com> Date: Mon, 18 Sep 2023 02:32:13 +0900 To: internals@lists.php.net X-Mailer: Apple Mail (2.3731.700.6) Subject: adding serialize_precision's value that uses mode2 and long double From: saki@sakiot.com (Saki Takamachi) Hi, internals. I had incorrect knowledge the `serialize_precision` until recently. I knew that setting this to `-1` would use a `long double`, but I didn't = know that the number of digits would not be `17`. I've looked through RFC related to this. https://wiki.php.net/rfc/precise_float_value There doesn't seem to be a setting that allows you to use `long double` = and `mode2` at the same time at the moment. I think there are various methods, such as a simple method such as = simply setting `serialize_precision =3D -2`, or a method of adding = another new setting item. When using long doubles, it is somewhat inconvenient not to be able to = display all digits with `var_dump()` or `debug_zval_dump()` when = debugging. (I use the word "inconvenient" because there is probably an alternative = method.) What do you think? Saki=