Open divinity76 opened 1 month ago
duplicate of https://github.com/php/php-src/issues/9209
duplicate of #9209
Nope, not really. That is about truncation of INF due to very low precision, but the reported issue here is about loosing the minus sign.
Also note that the problem is not particularly related to the precision, see https://3v4l.org/3F8nm. The only case where the minus sign would properly be retained is for padding="0", e.g. printf("%06g", -INF);, but that apparently looses the "I". Having had more test cases could have helped.
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.3.11
Operating System
Ubuntu 24.04