Re: Constants for better double edge case handling
| From: | Kalle Sommer Nielsen | Date: | Tue, 18 Oct 2016 19:05:28 +0000 |
| Subject: | Re: Constants for better double edge case handling | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96440@lists.php.net to get a copy of this message | ||
Hi Anatol
2016-10-18 20:46 GMT+02:00 Anatol Belski <anatol.php@belski.net>:
> Hi,
>
> I would like to suggest adding the following constants
>
> REGISTER_MAIN_LONG_CONSTANT("PHP_DBL_DIG", DBL_DIG, CONST_PERSISTENT |
> CONST_CS);
> REGISTER_MAIN_DOUBLE_CONSTANT("PHP_DBL_MAX", DBL_MAX, CONST_PERSISTENT |
> CONST_CS);
> REGISTER_MAIN_DOUBLE_CONSTANT("PHP_DBL_MIN", DBL_MIN, CONST_PERSISTENT |
> CONST_CS);
> REGISTER_MAIN_DOUBLE_CONSTANT("PHP_DBL_EPSILON", DBL_EPSILON,
> CONST_PERSISTENT | CONST_CS);
>
I like this idea but I do think that we should name them PHP_DOUBLE_*
or PHP_FLOAT_* (preferably the first).
--
regards,
Kalle Sommer Nielsen
kalle@php.net