Different Results of Integration in 7219 & 7250 (Gamma Function)

Different Results of Integration in 7219 & 7250 (Gamma Function) - Messages

#1 Posted: 11/8/2019 5:08:51 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Thank you Andrey for the Latest Beta 7250.
But, the attached SS File yields an error due to different result of
integration in 7250 compared to result in 7219.

SPI_Calc_Plain.sm (111 KiB) downloaded 45 time(s).

7219_CDF Gamma.png

7250_CDF Gamma.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#2 Posted: 11/8/2019 6:13:29 AM
Davide Carpi

Davide Carpi

1415 likes in 2872 posts.

Group: Moderator

Do you have the same settings about integrals' accuracy in both the versions?

File not found. File not found.

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 11/8/2019 8:20:08 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Yes, same settings in both versions.
But the difference is in Eqn 2

7219_Settings.png
7250_Integral Accuracy.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#4 Posted: 11/8/2019 12:15:57 PM
Andrey Ivashov

Andrey Ivashov

2269 likes in 3729 posts.

Group: Super Administrator

Thank you very much! It was a real calculation error I've introduced in 7250.

Fixed in 7251 (will be available very soon).

UPDATE: Released here: https://en.smath.com/forum/yaf_postst17461_Beta--SMath-Studio-0-99-7251--08-November-2019.aspx

Best regards, Andrey Ivashov.
1 users liked this post
Martin_B 11/8/2019 1:54:00 PM
#5 Posted: 11/10/2019 12:15:32 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

I deleted my previous post for more corrections.
Still I get errors in SS 7251.
I will come back soon.
Sorry for the inconvenience.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#6 Posted: 11/10/2019 3:59:21 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Integration results of Mathcad attached (using first 10 elements of X
and Eqns 1, 2 and 3.)

SPI_Calc_Plain.sm (125 KiB) downloaded 37 time(s).

CDF MathCAD.png

7251_CDFpng.png

Rainfal_Data.xlsx (486 KiB) downloaded 29 time(s).
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#7 Posted: 11/10/2019 11:01:56 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Integration results of Mathcad attached (using first 10 elements of X
and Eqns 1, 2 and 3.)


What I understand from your previous reports is that
the Simpson integrator is kaput again in latest SS version.
What more is kaput ? SS 6179 does not open your attachment.
In the mean time, can you doctor rkfixed your document ?
Cheers ... Jean

NDTMA.PNG

NDTMA.sm (54 KiB) downloaded 31 time(s).

#8 Posted: 11/11/2019 2:31:56 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Wrote

In the mean time, can you doctor rkfixed your document ?
Cheers ... Jean



Thank you. I will try my best ASAP.
In the mean time following files are attached.

Test_Gamma_7251.sm (35 KiB) downloaded 41 time(s).

Test_Gamma_7251.pdf (192 KiB) downloaded 38 time(s).
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#9 Posted: 11/11/2019 10:59:00 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thank you. I will try my best ASAP.
In the mean time following files are attached.


Here is doctored sanity MCD.
Don't forget Smath Gamma(x) is only globally 4 decimals,
immaterial in your CDF integration. If you need to check
the peak location of PDF, we have the Golden ratio algo.
Enjoy ... Jean.

NDTMA test.PNG

NDTMA Test Gamma.sm (45 KiB) downloaded 31 time(s).
#10 Posted: 11/11/2019 1:14:35 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... max PDF located

NDTMA Test Gamma.sm (22 KiB) downloaded 37 time(s).
Golden Ratio jmG.sm (35 KiB) downloaded 31 time(s).
#11 Posted: 11/12/2019 7:07:16 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Sincerely, I was trying to show that results of Gamma Function CDF
in 7251 were not compatible with 7219.
I wish to add that similar working in 7219 reasonably tally with MCD and EXCEL,
while 7251 is not so. I believe that may be the reason why I got errors using
SS ICDF.normal function in SPI calculations (some CDF values>1 ??).

Anyway, I am attaching the following files and images for further examination please.
Many thanks to all for their comments.

Fimal Gamma Results.zip (1 MiB) downloaded 33 time(s).

Test Gamma EXCEL.png

Test_Gamma_7219.png

Test_Gamma_7251.png

Test_Gamma_MCD.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#12 Posted: 11/12/2019 10:16:46 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi. You can try to implement your own algo's for gamma and int functions.

Clipboard01.gif

Test_Gamma_7251.sm (103 KiB) downloaded 38 time(s).

Best regards.
Alvaro.
2 users liked this post
frapuano 11/12/2019 10:31:00 AM, NDTM Amarasekera 11/12/2019 11:54:00 AM
#13 Posted: 11/12/2019 11:53:09 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Hi,Thank you. Your suggestion is highly commendable and accepted. Bravo!

But, very often, as practicing Engineers, we are inclined to use built-in
functions as much as possible in our day to day work in the design office.

The SPI calculation was such an effort I came across.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#14 Posted: 11/12/2019 12:07:05 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Sincerely, I was trying to show that results of Gamma Function PDF and CDF
in 7251 were not compatible with 7219.
I wish to add that similar working in 7219 reasonably tally with MCD and EXCEL,
while 7251 is not so. I believe that may be the reason why I got errors using
SS ICDF.normal function in SPI calculations (some CDF values


As you say ... hard to doctor this patient.
Your download opened by default on my 6179 carries the bug.
Could it be the vectorize operator is the cause ?
If so: that would be quite a bug !
Cheers ... Jean

Test_Gamma_7251 [6179].sm (22 KiB) downloaded 41 time(s).

NDTMA 7251_6179.PNG
#15 Posted: 11/12/2019 1:39:00 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Wrote

As you say ... hard to doctor this patient.
Your download opened by default on my 6179 carries the bug.
Could it be the vectorize operator is the cause ?
If so: that would be quite a bug !
Cheers ... Jean



It worked! Thanks, but how?

Test Gamma [2] 7251 [6179].sm (25 KiB) downloaded 31 time(s).

Test Gamma [2] 7251 [6179].png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#16 Posted: 11/12/2019 1:43:07 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote



But, very often, as practicing Engineers, we are inclined to use built-in
functions as much as possible in our day to day work in the design office.



Hi Nugegodage. I absolutely agree. Actually, I post for try to find where the bug is.

I include gamma too, because I think that, like happen in matlab and maple, plugins can be written in native smath code, not in c++. Maybe in this case, gamma and other special functions are not the best example for do that, but this is only meanwhile they are in plugins, not in smath native functions.

In my point of view, plugins are good for graphics, some objects (like formatted cells, writer regions), communication with external programs (maple, maxima) and some other things.

Best regards.
Alvaro.
#17 Posted: 11/12/2019 2:32:37 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Wrote

Could it be the vectorize operator is the cause ?



I have edited part of my original "SPI_Calc_Plain.sm" worksheet, and it
is evident the bug due to the vectorize operator.
Will come back soon with the edited version.

Thank you very much.
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#18 Posted: 11/12/2019 2:52:43 PM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

This confirms Jean's guess about vectorize operator.

TEST-SPI_Calc_Plain.sm (52 KiB) downloaded 32 time(s).

7251 Vectorize Error.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#19 Posted: 11/12/2019 3:17:55 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

It worked! Thanks, but how?


Answer is from observation(sss..)
My work sheet is clean and thus opened/calculated your 7251.
Your 7251 is corrupted and my 6179 executed the vectorize bug.
Mathematica has the expression shadow in context.
Read this: 6179 does not come with ZedGraph, one day some collab
posted a ZedGraph, 6179 did open and now my 6179 has ZedGraph.
SS 6346 had two versions: the official and un-official.
The un-official did lot more than the published version.
Detail about Gamma(x)like erf(x): under the integration operator,
they both need be vectorized. Maybe, the fact that I renamed/recast
it may have the virtue of doctoring. Though your Gamma(x) does
not play apparent role in the integration, it is still there as
a reluctant item to evaluate.
Now, if you recast your Gamma(x) Γ(x) in your original 7251
what happens bug/no_bug ? Like the English say: square the corner.

Cheers ... Jean
#20 Posted: 11/12/2019 3:23:46 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Hi Nugegodage. I absolutely agree


Thanks Alvaro,
Never Give up. Great things take time.
  • New Posts New Posts
  • No New Posts No New Posts