Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Sara Golemon
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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Joe Watkins
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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Rowan Collins
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_

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Claude Pache
> 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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Benjamin Morel
> > 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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Côme Chilliet
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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Michael Wallner
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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Joe Watkins
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

Re: [PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Diogo Neves
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

[PHP-DEV] PHP_FLOAT_MIN is positive

2019-04-03 Thread Benjamin Morel
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