On Wed, Apr 3, 2019 at 4:52 AM Benjamin Morel
wrote:
> I just used PHP_FLOAT_MIN for the first time, and was surprised that it is
> the smallest **positive** number representable. Is this expected?
>
> This is unlike PHP_INT_MIN, which is the absolute smallest representable
> integer, and as such
Thanks for explain.
Cheers
Joe
On Wed, 3 Apr 2019 at 14:40, Rowan Collins wrote:
> On Wed, 3 Apr 2019 at 13:33, Benjamin Morel
> wrote:
>
> > PHP_FLOAT_MIN (float)
> > > Smallest representable POSITIVE floating point number. If you need the
> > > smallest representable floating point number, u
On Wed, 3 Apr 2019 at 13:33, Benjamin Morel
wrote:
> PHP_FLOAT_MIN (float)
> > Smallest representable POSITIVE floating point number. If you need the
> > smallest representable floating point number, use - PHP_FLOAT_MAX.
> > Available as of PHP 7.2.0.
>
I'd avoid the word "smallest". PHP_FLOAT_
> Le 3 avr. 2019 à 11:51, Benjamin Morel a écrit :
>
> Hi internals,
>
> I just used PHP_FLOAT_MIN for the first time, and was surprised that it is
> the smallest **positive** number representable. Is this expected?
>
> This is unlike PHP_INT_MIN, which is the absolute smallest representable
>
> It really don't make much sense:
> var_dump( PHP_FLOAT_MIN < 0 );
> var_dump( PHP_INT_MIN < 0 );
I quite agree that this is an inconsistency, but I guess that it's here to
stay now for BC reasons. What we can do is fix the doc.
> 2.2250738585072E-308
> This is negative.
It isn't, it is a
Le mercredi 3 avril 2019, 13:47:55 CEST Joe Watkins a écrit :
> 2.2250738585072E-308
>
> This is negative.
>
> Cheers
> Joe
No it’s not.
It’s positive and close to 0.
Côme
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 03/04/2019 12:27, Diogo Neves wrote:
> It really don't make much sense:
>
>
> var_dump( PHP_FLOAT_MIN < 0 );
> var_dump( PHP_INT_MIN < 0 );
>
> On Wed, Apr 3, 2019 at 10:52 AM Benjamin Morel
> wrote:
>
>> Hi internals,
>>
>> I just used PHP_FLOAT_MIN for the first time, and was surprised t
2.2250738585072E-308
This is negative.
Cheers
Joe
On Wed, 3 Apr 2019 at 12:27, Diogo Neves wrote:
> It really don't make much sense:
>
>
> var_dump( PHP_FLOAT_MIN < 0 );
> var_dump( PHP_INT_MIN < 0 );
>
> On Wed, Apr 3, 2019 at 10:52 AM Benjamin Morel
> wrote:
>
> > Hi internals,
> >
> > I j
It really don't make much sense:
wrote:
> Hi internals,
>
> I just used PHP_FLOAT_MIN for the first time, and was surprised that it is
> the smallest **positive** number representable. Is this expected?
>
> This is unlike PHP_INT_MIN, which is the absolute smallest representable
> integer, and a
Hi internals,
I just used PHP_FLOAT_MIN for the first time, and was surprised that it is
the smallest **positive** number representable. Is this expected?
This is unlike PHP_INT_MIN, which is the absolute smallest representable
integer, and as such is negative:
echo PHP_INT_MIN; // -922337203685
10 matches
Mail list logo