go to bug id or search bugs for
As described in https://github.com/facebook/hhvm/issues/7594
there are new FMA (floating-point multiply-add) instructions,
which are emitted when the target system supports them
(GCC needs -O2 or higher).
The advantage of those instructions is that the provide more accurate results,
but that also means different results.
In HHVM this resulted in a self-test to fail.
As the calculated (and unexpected) value could be reproduced with
PHP7 on an arm64 machine (Ubuntu Xenial) as well,
I want to bring this up here in the PHP bugtracker as well.
var_dump( date_sunrise(mktime(0, 0, 0, 12, 26, 2012), SUNFUNCS_RET_DOUBLE) );
We got 9.6226631046689 instead of 9.622663104669.
Add a Patch
Add a Pull Request