Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Sanity checked vs Mathcad 11. Cuts the mustard a bit finer than first version. Γ(1,0)="Uncertainty" unsolved.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,126 Was thanked: 507 time(s) in 338 post(s)
|
Originally Posted by: Jean Giraud Sanity checked vs Mathcad 11. Cuts the mustard a bit finer than first version. Γ(1,0)="Uncertainty" unsolved. There is no uncertainty in gamma_r6. Everything look correct with those numbers. Γ(1)=1 γ(1,0)=0 Γ(1,0)=1
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
1. Example 3 ... added 2. Uncertainty solved for version not having 0 defined. Gamma [overlord sr.6].sm (40kb) downloaded 13 time(s).
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: overlord ... 3. don't want to disrespect, Alvaro's is a single line awesome code. 4. mine has same algorithm with more features, with faster calculation. ...
Hi overlord, of course you don't. My codes are mostly pedagogical, not for optimized for speed nor accuracy or something else. It's good to have codes with that. Best regards. Alvaro.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,126 Was thanked: 507 time(s) in 338 post(s)
|
Originally Posted by: Razonar Hi overlord, of course you don't. My codes are mostly pedagogical, not for optimized for speed nor accuracy or something else. It's good to have codes with that.
Best regards. Alvaro. Thanks, inspired by your code using sum(), and eliminating some useless variable definitions; I have managed to speed up 30% percent under linux. And should be more precise now. Only the 15th decimal digit may differs, and this is only sometimes. Regards. gamma_r7.sm (29kb) downloaded 13 time(s).Edited by user 12 June 2021 18:31:48(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,126 Was thanked: 507 time(s) in 338 post(s)
|
Apparently solve() can't read product() too. Had to change algorithm style for incomplete function. Hopefully this is the last version. Well, I have my doubts... (swh) Regards PS: solvers may not found an answer just because variable names, Razonar's idea implemented. gamma_r8.sm (30kb) downloaded 9 time(s). gamma_r8.sm (32kb) downloaded 10 time(s). <---gamma_r8-2 (function variable revision) Edited by user 13 June 2021 02:02:04(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Originally Posted by: overlord Originally Posted by: Razonar Hi overlord, of course you don't. My codes are mostly pedagogical, not for optimized for speed nor accuracy or something else. It's good to have codes with that.
Best regards. Alvaro. Thanks, inspired by your code using sum(), and eliminating some useless variable definitions; I have managed to speed up 30% percent under linux. And should be more precise now. Only the 15th decimal digit may differs, and this is only sometimes. Regards. The algorithm is valid for Re(z) > 0. See this notes please. gamma.sm (28kb) downloaded 13 time(s).Best regards. Alvaro.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: overlord Hopefully this is the last version. Well, I have my doubts... (swh)
Can't be more right ! 1. Smath Lanczos Davide code is 1/1 Keisan, Mathcad 11. 2. It supports imaginary argument. 3. It supports RootSecant. 4. Confirmed, your last Lanczos does not support RootSecant. I haven't checked Alvaro suggestion.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
... just a remark: Mathsoft suggested use exp(,) instead of e^. exp(,) more accurate/faster at kernel level.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,126 Was thanked: 507 time(s) in 338 post(s)
|
Imaginary numbers supplicated. Root Secant better than HT Davis. (last digit) Graphing works for all functions. Usually all solve methods works. Regards gamma_r9.sm (37kb) downloaded 18 time(s).
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Your latest sr.9 is mostly red in SS 6179, takes Eternity. Who cares ^308 ? On the other hand, could be damned slow in practical applications. Because not being built-in in native Smath ... proof: Lanczos plots Hypergeometric but takes 1 min versus resident Gamma(x). Why not use Lanczos as given by Davide ?
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,126 Was thanked: 507 time(s) in 338 post(s)
|
Originally Posted by: Jean Giraud Your latest sr.9 is mostly red in SS 6179, takes Eternity. Who cares ^308 ? On the other hand, could be damned slow in practical applications. Because not being built-in in native Smath ... proof: Lanczos plots Hypergeometric but takes 1 min versus resident Gamma(x). Why not use Lanczos as given by Davide ? - Who cares SMath 6179? - My algorithm is faster than your examples. - My Γ(x) prints hypergeom in less than a second, don't need integrated Gamma(). - Because my function has more features, and faster. Your PC is slow, your SMath_6179 is slow and broken, your examples are slow. Gamma [H.T. Davis, Lanczos_overlord].sm (63kb) downloaded 17 time(s). Gamma [H.T. Davis, Lanczos_overlord].pdf (156kb) downloaded 21 time(s).Edited by user 13 June 2021 21:33:08(UTC)
| Reason: Not specified
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.