On 30 July 2025 07:54:11 BST, Alexandre Daubois <alex.daubois+...@gmail.com> 
wrote:
>>> The value is a float that is not NaN or infinity
>>
>> It feels a bit odd to have a value where is_float($v) would be true, but 
>> is_representable_as_float($v) would be false. I'd be interested to 
>> understand the thinking behind this case.
>
>As the strings “INF” and “NAN” can't be cast as floats directly, I
>think it's safer to return false on these extreme values. See
>https://3v4l.org/TabMK#vnull for the cast example.


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.

https://3v4l.org/efucd


Rowan Tommins
[IMSoP]

Reply via email to