> Zend/zend_strtod.c
> патч на этот файл, zend engine собирается одинаково в любом случае, что
> cli, что cgi, что mod_php , что php-fpm , на сервере
> проверила с php-fpm, дома с 5.3.4 cli (Gentoo)
> и там и там -mfpmath=sse , так что FPU x87 для проявления
> ошибки не задействован,
> а вот в убунте собирают с -mfpmath=387, да и в остальных бинарных
> дистрах для x86 тоже, включая и archlinux , так что там
> по идее должно бы и проявляться зависание интерпретатора , причем способ
> вызова должен быть не важен, т.к. это в ZendEngine Zend/zend_float.h
/* Copy of the contents of xpfpa.h (which is under public domain)
See http://wiki.php.net/rfc/rounding for details.
Cross Platform Floating Point Arithmetics
This header file defines several platform-dependent macros that ensure
equal and deterministic floating point behaviour across several platforms,
compilers and architectures.
The current macros are currently only used on x86 and x86_64 architectures,
on every other architecture, these macros expand to NOPs. This assumes that
other architectures do not have an internal precision and the operhand types
define the computational precision of floating point operations. This
assumption may be false, in that case, the author is interested in further
details on the other platform.
For further details, please visit:
http://www.christian-seiler.de/projekte/fpmath/
Version: 20090317 */
/*
Implementation notes:
x86_64:
- Since all x86_64 compilers use SSE by default, it is probably unecessary
to use these macros there. We define them anyway since we are too lazy
to differentiate the architecture. Also, the compiler option -mfpmath=i387
justifies this decision.
General:
- It would be nice if one could detect whether SSE if used for math via some
funky compiler defines and if so, make the macros go to NOPs. Any ideas
on how to do that?
MS Visual C:
- Since MSVC users tipically don't use autoconf or CMake, we will detect
MSVC via compile time define.
*/
http://www.christian-seiler.de/projekte/fpmath/