Patch php-5.6.13-atan2.diff for Math related Bug #70568
Patch version 2015-09-30 22:13 UTC
Return to Bug #70568 |
Download this patch
Patch Revisions:
Developer: n13@inbox.ru
--- php-5.6.13-src/ext/standard/math.c 2015-09-02 17:02:46.000000000 +0700
+++ php-5.6.13-src.new/ext/standard/math.c 2015-10-01 02:09:24.520633849 +0700
@@ -465,7 +465,15 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", &num1, &num2) == FAILURE) {
return;
}
+#if defined(WINDOWS)
+ if (isinf(num1) && isinf(num2))
+ RETURN_DOUBLE(atan2(copysign(1, num1), copysign(1, num2)));
+ } else {
+ RETURN_DOUBLE(atan2(num1, num2));
+ }
+#else
RETURN_DOUBLE(atan2(num1, num2));
+#endif
}
/* }}} */
|