Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline Jean Giraud  
#21 Posted : 12 November 2019 21:38:42(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Gamma(x), erf(x).PNG
Offline ndtma  
#22 Posted : 13 November 2019 13:59:29(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 244
Man
Sri Lanka
Location: Colombo

Was thanked: 75 time(s) in 52 post(s)
Originally Posted by: ndtma Go to Quoted Post
Still I get errors in SS 7251.


After I got this error with 7251, again I did a Clean re-installation, and all issues posted later occurred consequent to this.

Furthermore, a similar Clean re-installation of 7251 was done in my second laptop today, but errors continued to occur with same test worksheets except Jean's "Test_Gamma_7251_[6179].sm".

Therefore, I have no alternative but leave it to the developers to decide.

Edited by user 13 November 2019 14:03:33(UTC)  | Reason: Not specified

Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
Offline Jean Giraud  
#23 Posted : 13 November 2019 16:43:58(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Originally Posted by: ndtma Go to Quoted Post
Therefore, I have no alternative but leave it to the developers to decide.

Wait and see what Grand Doctors have to say.
Frechet PDF is another one that Simpson rejects.
In the attached, rescued in two ways.
When compatible, dn_GearsBDF is hyperfast, known accurate.
Thanks Collab for your contribution, most interesting.
Cheers ... jean

Integrate Frechet.sm (22kb) downloaded 12 time(s).

Offline Jean Giraud  
#24 Posted : 13 November 2019 18:01:37(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
When compatible, dn_GearsBDF is hyperfast, known accurate.

It carries parameters as well, following a fitting session.

Integrate Frechet.sm (29kb) downloaded 12 time(s).
Offline ndtma  
#25 Posted : 15 November 2019 00:01:53(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 244
Man
Sri Lanka
Location: Colombo

Was thanked: 75 time(s) in 52 post(s)
Observed same problems even after a second Clean re-installation of 7251.
Consequently, I noticed that the Vectorize operator works correctly
when eval() function is used to evaluate alpha and beta of the Gamma function.
Otherwise, it gives incompatible results.
Has anybody experienced this issue?
Thank you Jean for the inspiration and encouragement.
Thank you Alvaro.
Any comments?

New_Test_Gamma.sm (15kb) downloaded 13 time(s).

New_Test_Gamma.png

Edited by user 15 November 2019 00:17:56(UTC)  | Reason: Not specified

Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
Offline Razonar  
#26 Posted : 15 November 2019 01:23:02(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 493
Uruguay

Was thanked: 292 time(s) in 181 post(s)
Originally Posted by: ndtma Go to Quoted Post

Any comments?


Clipboard01.gif

New_Test_Gamma.sm (12kb) downloaded 8 time(s).

Hi Nugegodage. I slightly modify your file, putting eval only where Mean appear. What I see rigth now, with your new file using eval, not before, is that there are not bug, and the "bad results" are because Mean can't be vectorized (or better say, isn't a good idea vectorize them), like any other function that take vectors or matrices as arguments.

Edited by user 15 November 2019 01:41:51(UTC)  | Reason: Upload the smath file.

Offline Jean Giraud  
#27 Posted : 15 November 2019 03:08:16(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Originally Posted by: ndtma Go to Quoted Post
Otherwise, it gives incompatible results.

Not clear what's incompatible in the yellow/red brace.

alphabeta.PNG
Offline ndtma  
#28 Posted : 12 May 2020 18:55:50(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 244
Man
Sri Lanka
Location: Colombo

Was thanked: 75 time(s) in 52 post(s)
Originally Posted by: ndtma Go to Quoted Post
Observed same problems even after a second Clean re-installation of 7251.


Gamma CDF function error revisited.
Following issues observed while trying to calculate SPI for a different set of data.

1. Gamma CDF function fails if 0 <'alpha' < 1
2. Even Razonar's method fails in such a situation.
3. According to the literature on calculation of SPI, the Gamma function is valid
for all 'alpha' values > 0.
4. No such issues in Excel or Mathcad.
5. Attached example is only to demonstrate the issue.

For the attention of authorities.

Gamma_CDF_Error_with_Alpha less than 1_.sm (14kb) downloaded 6 time(s).

Gamma_Eror.png

Edited by user 12 May 2020 19:01:05(UTC)  | Reason: Not specified

Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
thanks 1 user thanked ndtma for this useful post.
on 12/05/2020(UTC)
Offline Jean Giraud  
#29 Posted : 12 May 2020 22:02:58(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Originally Posted by: ndtma Go to Quoted Post
Gamma CDF function fails

Your integration is ill posed ... "x_undefined"
SMath native Gamma(x) 4 decimals and INT acc 50 have no impact.
Try your own alpha/beta.
Cheers ... Jean

Page1 NDTMA.sm (14kb) downloaded 6 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 13/05/2020(UTC)
Offline ndtma  
#30 Posted : 13 May 2020 06:40:30(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 244
Man
Sri Lanka
Location: Colombo

Was thanked: 75 time(s) in 52 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Try your own alpha/beta.
Cheers ... Jean


Thank you Jean. Your suggestion to introduce ε=10^{-15} as lower limit of integration
solved my problem. But still the error persists if lower limit is zero.
A beginner may be confused and/or discouraged in a similar situation.

Gamma_CDF_Error_with_Alpha less than 1_SOLVED.sm (107kb) downloaded 12 time(s).

Gamma_Eror_Solved.png

Edited by user 13 May 2020 08:03:29(UTC)  | Reason: Not specified

Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
thanks 1 user thanked ndtma for this useful post.
on 14/05/2020(UTC)
Offline Davide Carpi  
#31 Posted : 14 May 2020 14:18:01(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,274
Man
Italy
Location: Italy

Was thanked: 1153 time(s) in 757 post(s)
I see the issue... when alpha < 1 and t = 0 smath has 1/(0^(1-alpha)) and the numerical integrator fails. I'm not sure about how ccould be fixed.


Looking for improvements in the Gamma function...

Lanczos.sm (70kb) downloaded 12 time(s).


If you like my plugins please consider a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 14/05/2020(UTC),  on 14/05/2020(UTC)
Offline Jean Giraud  
#32 Posted : 14 May 2020 22:22:08(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Looking for improvements in the Gamma function...

Thanks Davide: sanity check [real/complex] vs Keisan/Casio
Offline Jean Giraud  
#33 Posted : 14 May 2020 23:09:31(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
All that is not as simple as the BigBang theory.
If the first computed 'x' appears in data < 10^-15
the quick plot rejects, no complain ... didn't check X_Y plot.
Thus: zero min value 10^-15.
Just experimented on Bézier/Bernstein project.
Cheers ... Jean
Offline ndtma  
#34 Posted : 19 May 2020 11:49:32(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 244
Man
Sri Lanka
Location: Colombo

Was thanked: 75 time(s) in 52 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Looking for improvements in the Gamma function..


A few more issues please.

Integral_Accuracy.png

Gamma_CDF_Error_Wrong_Results.sm (335kb) downloaded 7 time(s).

Gamma_CDF_Wrong_Result.png
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
Offline Jean Giraud  
#35 Posted : 19 May 2020 14:26:46(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Originally Posted by: ndtma Go to Quoted Post
A few more issues please.

Freak 7251 does not open !
You just have two values: α:=0.7352, β:=245.7456
That's enough to simulate/evaluate CDF.
Cheers ... Jean

CDF Gamma.sm (263kb) downloaded 10 time(s).
Offline ndtma  
#36 Posted : 20 May 2020 07:41:58(UTC)
ndtma


Rank: Advanced Member

Groups: Registered
Joined: 05/06/2014(UTC)
Posts: 244
Man
Sri Lanka
Location: Colombo

Was thanked: 75 time(s) in 52 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Freak 7251 does not open !


Sorry. PDF attached. Thank you Jean!

Gamma_CDF_Error_Wrong_Results.pdf (954kb) downloaded 6 time(s).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
Offline Jean Giraud  
#37 Posted : 20 May 2020 16:46:24(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,677
Canada

Was thanked: 792 time(s) in 628 post(s)
Ordinary Simpson is inadequate [too steep PDF, too long X's]
Romberg/Simpson algo style is just perfect.
All done in gray attached.
Cheers mon Ami from so far away !

CDF Gamma.sm (278kb) downloaded 9 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 20/05/2020(UTC)
Users browsing this topic
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.