> On 23 Oct 2014, at 20:50, Marc Bennewitz <php@mabe.berlin> wrote: > > You addresses data loss on convert float to int. > Do you also address data loss on int to float? > > |to_float(||9223372036854774784) -> pass |as it results in > 9223372036854774784 > |to_float(|||9223372036854774785|) -> |fail as it results in > 9223372036854774784
Floats aren’t expected to be precise, so I don’t see why this shouldn’t pass. It’s a loss of data, sure, but merely of precision, which is expected here. The reason I have to_int fail is because float overflow to int completely mangles your input. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php