Define an immediate function in RPN mode
|
01-01-2024, 07:08 PM
Post: #2
|
|||
|
|||
RE: Define an immediate function in RPN mode
(12-30-2023 03:51 PM)deSitter Wrote: Hello, I'd like to have e.g. the gamma function be immediate like SIN and COS and not require parenthesis. Is that doable, to define an immediate function that pops the stack into the argument slot? Has to work with complex values. This calculator is certainly a strange beast. Thanks in advance. PS obviously, in RPN mode.. Turns out that the CAS Gamma function has some undocumented optional parameters. (See below for documentation from Xcas.) Since the function can take up to 3 parameters, in RPN you have to specify Gamma(1), Gamma(2), or Gamma(3) depending on how many parameters you want to use. One way around this would be to write your own gamma function, say something like Code: EXPORT gamma(x) Then in RPN, you could just enter gamma without parentheses. (Notice the use of lowercase gamma to distinguish it from the built-in Gamma.) Just for the record, according to the Xcas documentation, Gamma(a)=∫(t^(a-1)*e^(-t),t,0,∞) Gamma(a,b)=ugamma(a,b) where ugamma(a,b)=∫(t^(a-1)*e^(-t),t,b,∞) Gamma(a,b,1)=ugamma(a,b) / Gamma(a); (the 1 can be any non-zero value) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Define an immediate function in RPN mode - deSitter - 12-30-2023, 03:51 PM
RE: Define an immediate function in RPN mode - Wes Loewer - 01-01-2024 07:08 PM
|
User(s) browsing this thread: 1 Guest(s)