• Epinephrine's Mathematical Probability Extension Library
    2 replies, posted
First Off: Long name am I right? [B]Q: What Is This?[/B] A: This is a [B][U]small[/U][/B] extension to the math._ library. It is mainly probability functions, like the permutation formula and the combination formula, etc. This is my first share in the GLua community, I hope atleast one person likes this and uses it for some purpose. If you don't fully understand these functions, you should probably google the formulas so you can figure out what they are meant to do, because I have already documented quite nicely everything that you should need to know if you are just getting a refresher of what this actually is. [release] [B][U] Math Extensions Included:[/U][/B] [B]math.Fact(num)[/B] -- Factorial Funciton [B]math.Comb(num, numchosen)[/B] -- Combination Formula Function [B]math.Perm(num, numchosen)[/B] -- Permutation Formula Function [B]math.BiProb(numtrials, numsuccess, successrate, failrate)[/B] [/release] ------------------------------------------------------------------------------------------------ I have supplied an ample amount of documentation and examples of how to use these functions and the explanations of the formulas. I also have added console commands so you can test the functions personally without having to writing testing code. [release] [B][U]Console Commands:[/U][/B] [B]math_factorial[/B] num [B]math_combination[/B] num numchosen [B]math_permutation [/B]num numchosen [B]math_biprob[/B] numtrials numsuccesstrials successrate failrate [/release] ----------------------------------------------------------------------------------------------- I hope you appreciate the work I put into this, especially since it is my first release. If you need any elaboration on how some of these functions work, or what the formulas are used for, just PM me I will be glad to assist you. Please post your comments, however try not to murder me with flaming :). Oh and I kinda rushed this because I have to head off somewhere, and won't be on till tomorrow! [release] [url]http://www.garrysmod.org/downloads/?a=view&id=95733[/url] [/release]
Thank you.
Those are rather simple functions, a useful addition to this would be a random number generator which follows different laws (uniform, exponential, normal, etc...). You put some effort into this, but I don't really see any use for those functions. To be honest, I've not seen factorials used a lot in programming.
Sorry, you need to Log In to post a reply to this thread.