*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** SUMMARY Inputting tan(π / 2) into KCalc does not return a correct value. You can get pi in the Constants>Mathematics dropdown, which is what I used. STEPS TO REPRODUCE 1. Set input mode to RAD 2. Input tan(pi / 2) 3. Press enter to calculate the result OBSERVED RESULT KCalc returns -6,05546978455e+12 EXPECTED RESULT KCalc should return "undefined" or nan or some other value indicating there is no result. SOFTWARE/OS VERSIONS Linux/KDE Plasma: openSUSE Tumbleweed, KDE Plasma 6 (available in About System) KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.1 ADDITIONAL INFORMATION Entering tan(90) in the degree mode seems to return nan like it should, so maybe this is a rounding error? Desmos, Photomath and Wolframalpha return correct values.
This is an old bug that is now more notorious due to the input display showing the "π", it is a rounding error, the π symbol gets converted to its decimal form and not to the originally intended KNumber Pi(), (https://invent.kde.org/utilities/kcalc/-/blob/master/knumber/knumber.h?ref_type=heads#L42)... I will look into it...