https://bugs.kde.org/show_bug.cgi?id=502849
Bug ID: 502849
Summary: Applying x! to a non-integer number gives a wrong
result
Classification: Applications
Product: kcalc
Version: 24.12.3
Platform: FreeBSD Ports
OS: FreeBSD
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Applying "x!" to a non-integer positive number (e. g. 2.5!) gives an incorrect
result, the factorial of the integer part (in this case 2). Factorials of
non-integer numbers must either be calculated using the gamma function, n! =
Γ(n+1), or throw an error message if this is impossible to implement.
https://en.wikipedia.org/wiki/Gamma_function
PS, applying x! to an integer negative number must always throw an error, the
gamma function (therefore, the factorial as well) is undefined at these points.
--
You are receiving this mail because:
You are watching all bug changes.