Pretty Accurate Gamma (Factorial) Function
Game Introduction
https://www.desmos.com/calculator/o23vsikuvk Graph info: The red graph is the actual gamma function. The green graph is this approximation. The blue graph is an old approximation. The approximations are only made to go from 0 (actually lim(+x -> 0) but it doesn't really matter) to 1. Both actually get -1 to 1 pretty well, though! Desmos somehow gets regressions to work, so I just put in a type of function I know Desmos is good at calculating regressions for, then spammed "hide graph" and "show graph". Doing this (for some reason) makes values change to become more accurate. How this works: This takes the fact that, let's say 3.75 factorial, can be written as 3.75 * 2.75 * 1.75 * 0.75 * gamma(0.75). The decimal place can be a simple thing multiplied! This means I could simply write an approximation for the gamma function from 0 to 1, then can calculate normal factorial and multiply them together! This is what I did, by writing a regression in Desmos that I could put into Scratch (the long equation). With all that, I'm able to approximate the gamma function!
How To Play
Type in a number to calculate/approximate its factorial. This is accurate from values lim(+x -> -1) to infinity (granted, infinity will take infinite time to compute). The gamma function is actually (x-1)!, so because gamma(0) is undefined, (-1)! is undefined! Sadly, this calculator does not work correctly with any number equal or less than -1.
Author
Geotale
Category
Game Information
Game Popularity
961 views
Collection Count
24 favorites





