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:
Q(t)=\begin{cases}e^{-t},&m=true\\e^t,&m=false\end{cases}

[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 
\overrightarrow F_g=G\frac{m_1m_2}{\overrightarrow r}
Newton's Second Law 
\overrightarrow F_{net}=m\overrightarrow a