Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105044 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17512 invoked from network); 3 Apr 2019 15:39:06 -0000 Received: from unknown (HELO mail-ed1-f54.google.com) (209.85.208.54) by pb1.pair.com with SMTP; 3 Apr 2019 15:39:06 -0000 Received: by mail-ed1-f54.google.com with SMTP id h22so14741709edw.7 for ; Wed, 03 Apr 2019 05:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=DK7PD+3EOI1IWPNwQCYmvjmI1fbUPhM9FieraVMWx2E=; b=KlwHfMYe39vdx27w8kcwEi8L/O243k/xNM20sxq2IOtrswmIVefXcwndTO4/55D6yG qWauQRrO8TG+FEiP7Q9TIBFmISppUbf2hRBg7C0W16gkU++6Bja6uHwSa5fgsQcAqy3r liMnylpUH7D2/i7kPZp/8nzrTgOtancyh7RF97lyJeWJxRnvGDB5fQnmHPOTDn3W/I6I tatsyighweKaujRuKM08+1+j6EgitStO4tgNRGrJ1eX4dxtlR62kqQW85eTRIynT8UJv ld/ubT2ebfsx1m6We9TKTMF/n/brd7QVlxcJZ971tQ2FjEspcg8Id+Tejz1zp0ieXW0t pTPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=DK7PD+3EOI1IWPNwQCYmvjmI1fbUPhM9FieraVMWx2E=; b=qgPDhLVTEq6b7u6KwWI2iQJJt3NgYudWMfqlAs2jMn18bAGQ95Y9uX6lYWk0x6oeLb EPE3Dw1Y+enm2npP19/3MDgg/tl5JVkMu1vmZK68LFJdGYjbnBufzOin+d8+zXWqarbs RJjadX+mHxAIE7Q4iwyzQF49obc4NCJcIBdW9cHQ7JMPmuyYRmwn9TNeqxfp+mnvE3I/ 7g0nwS9KpUlPmtpXg66fQzjgR+g/xsw9UDUeP1vpU5nYyPLrCUyOQ4Do0d/ilm3NR+tp auYHWnl7SxW9+UThzP44OjaFkqFfG74Pq5zUmshcS9BhwPyd3Ekj5V8yindEeGJENRbQ Z9uw== X-Gm-Message-State: APjAAAWIKj68AsPtCIfpoBdBu31hyofEo3gzT9P4AmSE9UT+yg1vuSQC bfqg/DJcZd++uoZVa9SghXx2DiBJnOo= X-Google-Smtp-Source: APXvYqwec9rZHLZ/lg0v/WzbZeI4uAa8pC8eFq57a22AHnxrV51FIw8sg3S+Ovfl6H9nvwD/4ivGdQ== X-Received: by 2002:a17:906:960a:: with SMTP id s10mr42760533ejx.141.1554294869424; Wed, 03 Apr 2019 05:34:29 -0700 (PDT) Received: from [192.168.0.63] (84-75-30-51.dclient.hispeed.ch. [84.75.30.51]) by smtp.gmail.com with ESMTPSA id z51sm4846066edb.9.2019.04.03.05.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 05:34:28 -0700 (PDT) Message-ID: <864415A3-B9FB-4998-AE2D-B65435C1B264@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_6B548379-3F1E-44D5-B891-C53A28560FB8" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Date: Wed, 3 Apr 2019 14:34:27 +0200 In-Reply-To: Cc: PHP Internals To: Benjamin Morel References: X-Mailer: Apple Mail (2.3445.104.8) Subject: Re: [PHP-DEV] PHP_FLOAT_MIN is positive From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_6B548379-3F1E-44D5-B891-C53A28560FB8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 3 avr. 2019 =C3=A0 11:51, Benjamin Morel = a =C3=A9crit : >=20 > Hi internals, >=20 > I just used PHP_FLOAT_MIN for the first time, and was surprised that = it is > the smallest **positive** number representable. Is this expected? >=20 > This is unlike PHP_INT_MIN, which is the absolute smallest = representable > integer, and as such is negative: >=20 > echo PHP_INT_MIN; // -9223372036854775808 > echo PHP_FLOAT_MIN; // 2.2250738585072E-308 >=20 > If it is intended, maybe the doc > should be clear > about this, at the moment it is just: >=20 > Smallest representable floating point number. >=20 >=20 > Which is confusing IMO. >=20 > Cheers, > Ben And in order to avoid further confusion, the constant ought to be = renamed PHP_FLOAT_MIN_POSITIVE. Rust named it correctly: = https://doc.rust-lang.org/std/f64/constant.MIN_POSITIVE.html = =E2=80=94Claude= --Apple-Mail=_6B548379-3F1E-44D5-B891-C53A28560FB8--