SUMMARY Currently, attempting to calculate factorial of a fractional number calculates factorial of its integer part. It would be a lot better if it calculated Pi function, the extension of factorial to fractional numbers STEPS TO REPRODUCE 1. Input a fractional number into KCalc (ex: 0.5) 2. Calculate its factorial OBSERVED RESULT Factorial of integer part is calculated (in this case, 1) EXPECTED RESULT Pi function is calculated (in this case, number equal to sqrt(pi)/2) SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2 ADDITIONAL INFORMATION Even Windows calculator does this
I think either an error should be displayed or the gamma function should be calculated -- just using the integer part is unexpected. Fwiw the android calculator just displays an error.
Gnome calculator also calculates Gamma/Pi function as factorial of fractional numbers. It's really weird to see a feature present in Gnome and Windows but absent from KDE
Yeah, that's probably legacy, it can be fixed no problem. what would make more sense? use gamma?
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kcalc/-/merge_requests/180