Post Reply 
Gamma function
08-16-2024, 11:46 PM
Post: #9
RE: Gamma function
(08-16-2024 08:04 PM)Albert Chan Wrote:  Cas> Gamma2(a) := piecewise((len(a)==2 AND a[2]==0),Gamma(a[1]), (len(a)==2 AND a[2]==inf),0, Gamma(a))

(08-16-2024 08:42 PM)ftneek Wrote:  I may have misunderstood because of the optional argument. The arguments are Gamma2(a,[b]).

All Gamma2 arguments goes to a. There is no b

Gamma2(2), a = 2         --> Gamma2(a) = Gamma(a) = Gamma(2)

Gamma2(2,3), a = [2,3] --> Gamma2(a) = Gamma(a) = Gamma(2,3)

type(a) = DOM_LIST, but a is not a normal list, we don't get Gamma([2,3])
a get flattened as arguments, similar to Python *lst

p3> lst = [2, 3]
p3> [1, *lst]
[1, 2, 3]

Cas> a = id(2,3)       --> [2,3], but *not* normal list!
Cas> [1,a]                --> [1,2,3], *not* [1,[2,3]]

Another way, we strip off list part to get this "star" list

Cas> a = op([2,3])    --> [2,3]
Cas> [1,a]                --> [1,2,3]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Gamma function - robmio - 08-06-2020, 01:56 PM
RE: Gamma function - robmio - 08-06-2020, 03:49 PM
RE: Gamma function - robmio - 08-06-2020, 06:14 PM
RE: Gamma function - ftneek - 08-16-2024, 09:36 AM
RE: Gamma function - Albert Chan - 08-16-2024, 11:47 AM
RE: Gamma function - ftneek - 08-16-2024, 06:06 PM
RE: Gamma function - Albert Chan - 08-16-2024, 08:04 PM
RE: Gamma function - ftneek - 08-16-2024, 08:42 PM
RE: Gamma function - Albert Chan - 08-16-2024 11:46 PM



User(s) browsing this thread: 5 Guest(s)