@@ -204,83 +204,6 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
204
204
}
205
205
/* }}} */
206
206
207
- /* {{{ php_asinh
208
- */
209
- static double php_asinh (double z )
210
- {
211
- #ifdef HAVE_ASINH
212
- return (asinh (z ));
213
- #else
214
- # ifdef _WIN64
215
- if (z >= 0 ) {
216
- return log (z + sqrt (z * z + 1 ));
217
- }
218
- else {
219
- return - log (- z + sqrt (z * z + 1 ));
220
- }
221
- # else
222
- return (log (z + sqrt (1 + pow (z , 2 ))) / log (M_E ));
223
- # endif
224
- #endif
225
- }
226
- /* }}} */
227
-
228
- /* {{{ php_acosh
229
- */
230
- static double php_acosh (double x )
231
- {
232
- #ifdef HAVE_ACOSH
233
- return (acosh (x ));
234
- #else
235
- # ifdef _WIN64
236
- if (x >= 1 ) {
237
- return log (x + sqrt (x * x - 1 ));
238
- } else {
239
- return ZEND_NAN ;
240
- }
241
- # else
242
- return (log (x + sqrt (x * x - 1 )));
243
- # endif
244
- #endif
245
- }
246
- /* }}} */
247
-
248
- /* {{{ php_atanh
249
- */
250
- static double php_atanh (double z )
251
- {
252
- #ifdef HAVE_ATANH
253
- return (atanh (z ));
254
- #else
255
- return (0.5 * log ((1 + z ) / (1 - z )));
256
- #endif
257
- }
258
- /* }}} */
259
-
260
- /* {{{ php_log1p
261
- */
262
- static double php_log1p (double x )
263
- {
264
- #ifdef HAVE_LOG1P
265
- return (log1p (x ));
266
- #else
267
- return (log (1 + x ));
268
- #endif
269
- }
270
- /* }}} */
271
-
272
- /* {{{ php_expm1
273
- */
274
- static double php_expm1 (double x )
275
- {
276
- #ifndef PHP_WIN32
277
- return (expm1 (x ));
278
- #else
279
- return (exp (x ) - 1 );
280
- #endif
281
- }
282
- /* }}}*/
283
-
284
207
/* {{{ proto int|float abs(int|float number)
285
208
Return the absolute value of the number */
286
209
PHP_FUNCTION (abs )
@@ -533,7 +456,7 @@ PHP_FUNCTION(asinh)
533
456
ZEND_PARSE_PARAMETERS_START (1 , 1 )
534
457
Z_PARAM_DOUBLE (num )
535
458
ZEND_PARSE_PARAMETERS_END ();
536
- RETURN_DOUBLE (php_asinh (num ));
459
+ RETURN_DOUBLE (asinh (num ));
537
460
}
538
461
/* }}} */
539
462
@@ -546,7 +469,7 @@ PHP_FUNCTION(acosh)
546
469
ZEND_PARSE_PARAMETERS_START (1 , 1 )
547
470
Z_PARAM_DOUBLE (num )
548
471
ZEND_PARSE_PARAMETERS_END ();
549
- RETURN_DOUBLE (php_acosh (num ));
472
+ RETURN_DOUBLE (acosh (num ));
550
473
}
551
474
/* }}} */
552
475
@@ -559,7 +482,7 @@ PHP_FUNCTION(atanh)
559
482
ZEND_PARSE_PARAMETERS_START (1 , 1 )
560
483
Z_PARAM_DOUBLE (num )
561
484
ZEND_PARSE_PARAMETERS_END ();
562
- RETURN_DOUBLE (php_atanh (num ));
485
+ RETURN_DOUBLE (atanh (num ));
563
486
}
564
487
/* }}} */
565
488
@@ -644,10 +567,7 @@ PHP_FUNCTION(exp)
644
567
/* }}} */
645
568
646
569
/* {{{ proto float expm1(float number)
647
- Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero */
648
- /*
649
- WARNING: this function is experimental: it could change its name or
650
- disappear in the next version of PHP!
570
+ Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero
651
571
*/
652
572
PHP_FUNCTION (expm1 )
653
573
{
@@ -657,15 +577,12 @@ PHP_FUNCTION(expm1)
657
577
Z_PARAM_DOUBLE (num )
658
578
ZEND_PARSE_PARAMETERS_END ();
659
579
660
- RETURN_DOUBLE (php_expm1 (num ));
580
+ RETURN_DOUBLE (expm1 (num ));
661
581
}
662
582
/* }}} */
663
583
664
584
/* {{{ proto float log1p(float number)
665
- Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero */
666
- /*
667
- WARNING: this function is experimental: it could change its name or
668
- disappear in the next version of PHP!
585
+ Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero
669
586
*/
670
587
PHP_FUNCTION (log1p )
671
588
{
@@ -675,7 +592,7 @@ PHP_FUNCTION(log1p)
675
592
Z_PARAM_DOUBLE (num )
676
593
ZEND_PARSE_PARAMETERS_END ();
677
594
678
- RETURN_DOUBLE (php_log1p (num ));
595
+ RETURN_DOUBLE (log1p (num ));
679
596
}
680
597
/* }}} */
681
598
@@ -695,11 +612,9 @@ PHP_FUNCTION(log)
695
612
RETURN_DOUBLE (log (num ));
696
613
}
697
614
698
- #ifdef HAVE_LOG2
699
615
if (base == 2.0 ) {
700
616
RETURN_DOUBLE (log2 (num ));
701
617
}
702
- #endif
703
618
704
619
if (base == 10.0 ) {
705
620
RETURN_DOUBLE (log10 (num ));
@@ -757,13 +672,7 @@ PHP_FUNCTION(hypot)
757
672
Z_PARAM_DOUBLE (num2 )
758
673
ZEND_PARSE_PARAMETERS_END ();
759
674
760
- #if HAVE_HYPOT
761
675
RETURN_DOUBLE (hypot (num1 , num2 ));
762
- #elif defined(_MSC_VER )
763
- RETURN_DOUBLE (_hypot (num1 , num2 ));
764
- #else
765
- RETURN_DOUBLE (sqrt ((num1 * num1 ) + (num2 * num2 )));
766
- #endif
767
676
}
768
677
/* }}} */
769
678
0 commit comments