How to define minimum value for given number? I want to say minimum value for X is 1000. now X can be anything. so M would be the multiplier of X so that M*X >= 1000. What would be the mathematic way of doing this without using if statement?
M = 1;
X = 1000;
if(X < 1000) M = 1000/X;
X = M*X;

I want something like 
$M = 1000/X$
$X = M*X;$
But this means X is always 1000. its not minimum.
I'm just being curios of what could be the expression without if statement.
 A: If you want to ensure that $X$ isn't lower than $1000$, using a multiplier is a contrived way* to achieve it.
Just write
$$X\leftarrow\max(X,1000).$$

The contrived way
You want to ensure
$$MX\ge1000$$ so that
$$M\ge\frac{1000}X.$$
Then you can take the multiplier
$$\max\left(1,\frac{1000}X\right)$$
and assign
$$X\leftarrow X*\max\left(1,\frac{1000}X\right).$$
A: Ah, Yves Daoust beat me to it. Note that if you want a differentiable function, then you can approximate the maximum function with something like $\log(e^x+e^{1000})$. This quantity is always greater than $1000$; for large $x$, it is slightly greater than $x$. It is never exactly equal to $x$, so it may not fit your needs. (It is also tricky to implement properly on a computer.)
More generally, you could compute $h\log(e^{x/h}+e^{1000/h})$ with a tunable parameter $h$; smaller values give you a sharper transition.
A: How about something like this?
$$
f(x) = \left\{
        \begin{array}{ll}
            x & \quad x \geq 1000 \\
            1000 & \quad x < 1000
        \end{array}
    \right.
$$
A: Late for the show, however here is my try.
Let$\quad a,b\in\Bbb R$
$$max(a,b) = \frac{a + b + \vert a-b\vert}{2}$$
and
$$\vert a\vert = \sqrt{a^2}\quad$$

This leads to 
$$M = (1000 + X + abs(1000 - X)) / 2;$$
Another (computationally slower) way to write this:
$$M = (1000 + X + sqrt( pow(1000 - X, 2) ) / 2;$$
