-->
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
-->
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
General Discussion
»
Other Discussions
»
Math and Science
»
Gamma!
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Gamma! (Read 7777 times)
0 Members and 1 Guest are viewing this topic.
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4705
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Gamma!
«
on:
May 17, 2013, 11:08:55 am »
I wanted to show you one result from my work over the past two days, since it lead to some neat derivations. Essentially, it is an approximation that converges to the gamma function. I know, it isn't that awesome, but I had fun
Attached are some computation thingies, too, if you wanted to look at it.
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
ruler501
Meep
LV11
Super Veteran (Next: 3000)
Posts: 2475
Rating: +66/-9
Crazy Programmer
Re: Gamma!
«
Reply #1 on:
May 17, 2013, 08:26:20 pm »
I see how you prove it is a function that matches that f(x+1)=f(x)*(x+1) but how do you prove it is the gamma function? I thought you could have an infinite number of functions with this feature and the gamma was special in some way that made it a better approximation for most purposes.
Logged
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here
https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y
Adriweb
Editor
LV10
31337 u53r (Next: 2000)
Posts: 1708
Rating: +229/-17
Re: Gamma!
«
Reply #2 on:
May 17, 2013, 08:46:06 pm »
Interesting read
I've worked with those functions for school for like 2 years now
I couldn't resist looking things up on Wolfram Alpha with what you said.
It turns out that :
(
)
I wanted to graph the difference between the 2 things :
It's commonly known that gamma(x+1) == x!, so graphing what you say is (to see the difference) :
A bit weird (against your idea at least) since it doesn't look like it's converging as x gets bigger ?....
But then I saw that W|A actually give what you'd be looking for : the difference between the 2 expressions :
But that's not really usable then ^^
(Well, Mathematice 9 doesn't get further, or at least not directly :
)
«
Last Edit: May 17, 2013, 08:46:47 pm by adriweb
»
Logged
+1/-0 karm for this message
My calculator programs
TI-Planet.org
co-admin.
TI-Nspire Lua programming
:
Tutorials
|
API Documentation
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4705
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Gamma!
«
Reply #3 on:
May 17, 2013, 09:03:15 pm »
That is spectacular, thank you, Adriweb o.o
@ruler501: I believe that the defining characteristic of the Gamma function (the one that makes it unique) is that its concavity is always up. There are infinitely many functions that satisfy the other traits, but once you have a function that satisfies those and is concave up, it must be the Gamma function.
Evidently, I need to see where I have the difference of two ratios wrong
Again, thanks!
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
ruler501
Meep
LV11
Super Veteran (Next: 3000)
Posts: 2475
Rating: +66/-9
Crazy Programmer
Re: Gamma!
«
Reply #4 on:
May 17, 2013, 11:48:47 pm »
I would think that all factorial functions would be concave up as they are all increasing at ever faster rates
According to wikipedia the thing that makes it unique is that it is superconvex(the composition of it and the log function is concave up)
Logged
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here
https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4705
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Gamma!
«
Reply #5 on:
May 22, 2016, 12:49:16 pm »
This time I bring a much better approximation to the Gamma function!
##\Gamma(x+1) \approx f(x)=C\sqrt{x}x^{x}e^{-x+\frac{1}{12x}-\frac{1}{360x^{3}}+\frac{1}{1260x^{5}}}, C\approx2.5066282745692##
The approximation gets better as x gets bigger, too! For example,
##\Gamma(1.5)=\frac{\sqrt{\pi}}{2}\approx.8862269255##
.
However,
##f(.5)\approx.9008942683##
which is terrible accuracy
Instead we do
##\frac{f(9.5)}{9.5*8.5*7.5*...*1.5}\approx.8862269255##
!
How did I derive this?
First I observed that
##ln(n!)=\sum_{k=1}^{n}{ln(k)}=\sum_{k=2}^{n}{ln(k)}##
, and then I applied the Euler-Maclaurin formula to get:
##\sum_{k=2}^{n}{log(k)}=\int_{1}^{n}{log(x)dx}+\frac{log(n)-log(1)}{2}+\sum_{k=1}^{\infty}{\frac{B_{2k}(2k-2)!}{(2k)!}\left(n^{1-2k}-1\right)}##
##\sum_{k=2}^{n}{log(k)}=xlog(x)-x+1+\frac{log(n)}{2}+C+\sum_{k=1}^{\infty}{\frac{B_{2k}}{2k(2k-1)}n^{1-2k}}##
From there I tested a few values to approximate C, then I truncated the sum to three terms!
Also, the function
##f(1)=1, f(x)=x^{x}f(x-1)##
can be approximated by:
##Cx^{x(x+1)/2}e^{ln(x)/12-x^{2}/4+\frac{1}{720x^{2}}-\frac{1}{5040x^{4}}+\frac{1}{10080x^{6}}}, C\approx1.282427129442##
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
General Discussion
»
Other Discussions
»
Math and Science
»
Gamma!
\n\t\t\t\t\t\t\t\t\t
<' + '/div>\n\t\t\t\t\t\t\t\t\t
%body%<' + '/textarea>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
Max characters: 20000; characters remaining:
...<' + '/span><' + '/span>
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>', sTemplateSubjectEdit: '
', sTemplateBodyNormal: '%body%', sTemplateSubjectNormal: '
%subject%<' + '/a>', sTemplateTopSubject: 'Topic: %subject% (Read 7777 times)', sErrorBorderStyle: '1px solid red' }); aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "
Jump to:<" + "/label> %dropdown_list%", iCurBoardId: 144, iCurBoardChildLevel: 1, sCurBoardName: "Math and Science", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "go" }); aIconLists[aIconLists.length] = new IconList({ sBackReference: "aIconLists[" + aIconLists.length + "]", sIconIdPrefix: "msg_icon_", sScriptUrl: smf_scripturl, bShowModify: true, iBoardId: 144, iTopicId: 18939, sSessionId: "cbb9292596223ce01b1be5f955232afc", sSessionVar: "c2a462096", sLabelIconList: "Message Icon", sBoxBackground: "transparent", sBoxBackgroundHover: "#ffffff", iBoxBorderWidthHover: 1, sBoxBorderColorHover: "#adadad" , sContainerBackground: "#ffffff", sContainerBorder: "1px solid #adadad", sItemBorder: "1px solid #ffffff", sItemBorderHover: "1px dotted gray", sItemBackground: "transparent", sItemBackgroundHover: "#e0e0f0" }); } function tick2() { if (typeof(document.forms.quickModForm) != "undefined") { calcCharLeft2(); setTimeout("tick2()", 1000); } else setTimeout("tick2()", 800); } function message_onkeyup() { if (typeof(document.forms.quickModForm) != "undefined" && typeof(document.forms.quickModForm.message) != "undefined") { document.forms.quickModForm.message.onkeyup = function onkeyup(event) { storeCaret(this); calcCharLeft2(); }; } else setTimeout("message_onkeyup()", 800); } message_onkeyup(); function calcCharLeft2() { var maxLength = 20000; var oldEditor = "", currentEditor = document.forms.quickModForm.message.value; if (!document.getElementById("editorLeft2")) return; if (oldEditor != currentEditor) { oldEditor = currentEditor; if (currentEditor.replace(/\r/, "").length > maxLength) document.forms.quickModForm.message.value = currentEditor.replace(/\r/, "").substring(0, maxLength); currentEditor = document.forms.quickModForm.message.value.replace(/\r/, ""); } setInnerHTML(document.getElementById("editorLeft2"), maxLength - currentEditor.length); } // ]]>-->