Hi Rowan,

> I'm not sure where you got those numbers; on a 64-bit architecture (surely 
> the vast majority of PHP installs), a float can precisely represent any whole 
> number from -2**53 up to 2**53 - 1. As a Unix timestamp, that's a one-second 
> accuracy for any time 285 million years into the past or future. 
> https://www.wolframalpha.com/input?i=2**53+as+unix+timestamp
> 
> Possibly you're thinking of a representation that counts integers as 
> milliseconds or microseconds, instead of seconds?

Yes, I'm assuming a timestamp that includes up to microseconds. This is because 
in the last example of the PR description, the microsecond timestamp was 
expressed as a float.

For information on the number of digits that guarantee float accuracy, please 
see the following documentation:
https://www.php.net/manual/en/reserved.constants.php

The constant PHP_FLOAT_DIG is its value. This is set to 16 for IBM and 15 for 
others.

Regards.

Saki
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to