Gamma Functions - rapid speed with precision - Сообщения
Lower Incomplete Gamma function,
Upper Incomplete Gamma function,
with almost instant speed and high precision.
Regards
gamma.sm (34 КиБ) скачан 118 раз(а). <---- least accurate
gamma_r2.sm (11 КиБ) скачан 122 раз(а).
gamma_r3.sm (11 КиБ) скачан 116 раз(а).
gamma_r4.sm (13 КиБ) скачан 114 раз(а).
gamma_r5.sm (11 КиБ) скачан 115 раз(а).
gamma_r6.sm (17 КиБ) скачан 108 раз(а).
gamma_r7.sm (28 КиБ) скачан 132 раз(а).
gamma_r8.sm (31 КиБ) скачан 125 раз(а).
gamma_r9.sm (36 КиБ) скачан 176 раз(а). <----imaginary numbers added

Wrote
Main limitation is smath floating points.
Python gives much more accurate results with same algorithms.
Try the other one for gamma calculation.
gamma_r2.sm (11 КиБ) скачан 122 раз(а).

WroteTry the other one for gamma calculation.
round(■ ,■ ,■ ) ... undefined
H.T.Davis [Abramowitz & Stegun] -> very objective.
In the mean time I'm finishing two superb applications examples
... examples based on your first Gamma(a,x) version,
Thanks for that one, gorgeous ... Jean.
gamma_r2 [H.T.Davis].sm (57 КиБ) скачан 105 раз(а).
WroteWroteTry the other one for gamma calculation.
round(■ ,■ ,■ ) ... undefined
H.T.Davis [Abramowitz & Stegun] -> very objective.
In the mean time I'm finishing two superb applications examples
... examples based on your first Gamma(a,x) version,
Thanks for that one, gorgeous ... Jean.
Undefined because you have an old version of smath.
Round(#,#,#) is not parsed through your program.
Use trunc() instead. And with more constants.
gamma_r3.sm (11 КиБ) скачан 116 раз(а).

Now, the old Rooster is going in the bed marmite ... Jean.
gamma(a,x) Applications.sm (23 КиБ) скачан 116 раз(а).
WroteAs offered ... two applications.
Now, the old Rooster is going in the bed marmite ... Jean.
gamma(a,x) Applications.sm (23 КиБ) скачан 116 раз(а).
I suggest you to change gamma function with gamma_r4.
It is 3 times faster and much more precise.
WroteI suggest you to change gamma function with gamma_r4.
It is 3 times faster and much more precise.
Thanks for gamma_r4
1. NO gain timing both applications
2. gamma_r4 Does NOT solve ... first version solves.
WroteThanks for gamma_r4
1. NO gain timing both applications
2. gamma_r4 Does NOT solve ... first version solves.
Speed may differ between linux and windows.
gamma_r4 is faster 3 times in linux.
What do you mean by 'does not solve'?
How should this page look like?
gamma(a,x) Applications.pdf (125 КиБ) скачан 128 раз(а).
WroteIt solves, not with conventional methods.
They tend to give errors, not gamma_r4's fault.
alglib is the answer, it usually gives result.
Good rescue ... OK.
As it looks, sr4 resides at the kernel level.
Thus, it plots but not solve(,,,,)
because not scalar wrt 'x' for the solve bloc.
WroteGood rescue ... OK.
As it looks, sr4 resides at the kernel level.
Thus, it plots but not solve(,,,,)
because not scalar wrt 'x' for the solve bloc.
Nope, not related with kernel, blocks, scalability, etc.
It is probably a bug of solve(), roots(), FindRoot().
Gamma Function has nothing to do with it.
Even very simple ones suffer from this too.
Check below.

I have updated the bugreport in Bugs and Problems > solve() bug.
Using cases() seems to solve the issue. Check the sample below.
gamma_r5.sm (11 КиБ) скачан 115 раз(а).

WroteCheck the sample below
Doctored version confirmed.
My bad, should check it carefully. Corrected page is below.
Refactored so it is faster, also get rid of recursive call.
I had to get around some smath bugs with line, if/cases, recursive.
Correlation of them gives weird errors.
Hope this version solves all issues and be the last one.
I know I have flooded this topic too much, sorry for inconvenience.
Regards
gamma_r6.sm (17 КиБ) скачан 108 раз(а).
PS: gamma for negative non-integer values support corrected

WroteI know I have flooded this topic too much
You may not like my verdicts:
1. on-line faster has no or little interest, neither up ^307.
2. Your first version runs fine the two applications.
3. The champion is the long time ago published Alvaro Γ(x)
4. for these two applications [2] & [3] are same
but => [3] drops timing [2] from 24 s down 18 s
The drop in timing results from Alvaro Γ(x)
running at the kernel scalar level.
BTW, my original H.T. Davis sanity Mathcad & Alvaro Γ(x)
By same token, thanks Alvaro for your Γ(x).
Cheers ... Jean
Maths Special Gamma(a,x) Incomplete APPLICATIONS [Alvaro G(x)].sm (26 КиБ) скачан 114 раз(а).
WroteWroteI know I have flooded this topic too much
You may not like my verdicts:
1. on-line faster has no or little interest, neither up ^307.
2. Your first version runs fine the two applications.
3. The champion is the long time ago published Alvaro Γ(x)
4. for these two applications [2] & [3] are same
but => [3] drops timing [2] from 24 s down 18 s
The drop in timing results from Alvaro Γ(x)
running at the kernel scalar level.
BTW, my original H.T. Davis sanity Mathcad & Alvaro Γ(x)
By same token, thanks Alvaro for your Γ(x).
Cheers ... Jean
Maths Special Gamma(a,x) Incomplete APPLICATIONS [Alvaro G(x)].sm (26 КиБ) скачан 114 раз(а).
1. 10^308 feature added for fully use IEEE capability.
2. gamma_r6 runs every possible applications.
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.
4. gamma_r6 is faster from gamma_r2 and gamma_r3 while trying to have all feature.
gamma_r6_app.sm (33 КиБ) скачан 117 раз(а).
Here is a side by side comparison with Alvaro's algorithm with mine.
On linux, gamma_r6 is faster about 20 percent.
-
Новые сообщения
-
Нет новых сообщений