Re: [RFC] Add "is_representable_as_float()" and "is_representable_as_int()" functions
| From: | Alexandre Daubois | Date: | Wed, 30 Jul 2025 07:45:10 +0000 |
| Subject: | Re: [RFC] Add "is_representable_as_float()" and "is_representable_as_int()" functions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128317@lists.php.net to get a copy of this message | ||
> The sentence I quoted isn't talking about string inputs, it's talking about values
> that are already floats. The fact that you can't create one from a string cast doesn't
> seem relevant, if you have in fact created one some other way.
Ah yes, my bad. I just updated the RFC page with your previous
comments. Also, I changed examples of INF and NAN to return true with
"is_representable_as_float()". The example of the float overflowing to
infinity (2**1024) is also updated to return true.
Best,
Alexandre Daubois