Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


2 Pages<12
Options
Go to last post Go to first unread
Offline Jean Giraud  
#21 Posted : 11 June 2021 20:49:26(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Sanity checked vs Mathcad 11.
Cuts the mustard a bit finer than first version.
Γ(1,0)="Uncertainty" unsolved.
Offline overlord  
#22 Posted : 11 June 2021 20:56:09(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
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

2021-06-11_20-54.png
Offline Jean Giraud  
#23 Posted : 11 June 2021 22:33:56(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 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).
Offline Razonar  
#24 Posted : 12 June 2021 08:20:08(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: overlord Go to Quoted Post
...
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.
Offline overlord  
#25 Posted : 12 June 2021 16:15:48(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: Razonar Go to Quoted Post
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).

2021-06-12_18-31.png

Edited by user 12 June 2021 18:31:48(UTC)  | Reason: Not specified

Offline overlord  
#26 Posted : 12 June 2021 20:58:22(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 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)

2021-06-13_01-47.png

Edited by user 13 June 2021 02:02:04(UTC)  | Reason: Not specified

Offline Razonar  
#27 Posted : 13 June 2021 02:03:48(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: overlord Go to Quoted Post
Originally Posted by: Razonar Go to Quoted Post
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.

Offline Jean Giraud  
#28 Posted : 13 June 2021 02:20:04(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: overlord Go to Quoted Post
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.

Lanczos.PNG
Offline Jean Giraud  
#29 Posted : 13 June 2021 02:23:36(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
... just a remark:
Mathsoft suggested use exp(,) instead of e^.
exp(,) more accurate/faster at kernel level.
Offline overlord  
#30 Posted : 13 June 2021 07:26:31(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 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).

2021-06-13_07-19.png
Offline Jean Giraud  
#31 Posted : 13 June 2021 17:18:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 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 ?
Offline overlord  
#32 Posted : 13 June 2021 21:26:22(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,124
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
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).

Gamma [H.T. Davis, Lanczos_overlord].png

Edited by user 13 June 2021 21:33:08(UTC)  | Reason: Not specified

Users browsing this topic
Similar Topics
Incomplete Gamma Functions (Bugs & Problems)
by overlord 06/06/2021 14:45:29(UTC)
2 Pages<12
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.