User:Simguru
From Wikipedia, the free encyclopedia
[edit] My Own Sandbox
This page is not meant to be useful, but just my own personal sandbox to help remind me how to format Wiki articles. I leave you with the Quality Equation, which can be derived by applying the Dilbert Principle:
[edit] Algorithms
- Factorial
- A factorial function can be defined recursively:
function factorial(x) { if (x ≤ 1) return 1; else return x * factorial(x-1); }
- or iteratively:
function factorial(x) { int i,n=1; for (i=1; i≤x; i++) { n = n * i; } return n; }
- Round
- The round function is commonly used in mathematics:
function round(x) { return floor(x+0.5); }
[edit] Newton's Laws
- Gravitation
- Newton's Second Law