PaddiM8 / kalker

Scientific calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals
https://kalker.xyz
MIT License
1.64k stars 74 forks source link

Unable to define multi-argument function with long name #86

Closed ss7m closed 2 years ago

ss7m commented 2 years ago

In my kalk config file I have defined a function

nCr(n, k) = n! / (k! * (n - k)!)

(this calculates n choose k). This used to work as expected, but at some point it stopped working, and defining this function gives the error message

Unable to invert: Function 'nCr'

This error does not happen if I define the function as being named f instead of nCr. Moreover, function definitions like foo(x) = x^2 work as expected. How should I define the function nCr with that name?

PaddiM8 commented 2 years ago

This looks like a bug indeed. I'm able to reproduce it in the latest release but not in the latest commit, so it seems like it has been fixed! By the way, there is actually already a nCr function available!