]> granicus.if.org Git - php/commit
Bugfix#70896 gmp_fact() silently ignores non-integer inputs
authorSara Golemon <pollita@php.net>
Wed, 27 Jul 2016 04:57:07 +0000 (21:57 -0700)
committerSara Golemon <pollita@php.net>
Wed, 27 Jul 2016 05:04:18 +0000 (22:04 -0700)
commit665050787c18a5d09f1b6d1443efbad901b9ac0b
tree8e9125c1872bf74b53c554986a9d2f7772b256fc
parent256d69cf8a9a67a47b92ad8e8c437b2d59d6806c
Bugfix#70896 gmp_fact() silently ignores non-integer inputs

Factorials only make sense for integer inputs.
To do something factorial-like, the Gamma Function
should be used instead.
However, at this point it's no longer a factorial.

For PHP/GMP, we'll raise a warning on trying to use
a non-integer input, but carry on returning the truncated
value as we used to (avoiding BC breakage).
NEWS
ext/gmp/gmp.c
ext/gmp/tests/gmp_fact.phpt