A function such that $f(0) = 1$ and $f(x) = x$ otherwise Let $x$ be a real number and $f$ a function such that $f(x)=x$ if $x\not=0$ and $f(0)=1$.
Does there exist a function like this, with an algebraic formula? 
EDIT: Thank you for your answers, I know a function can be described that way, but I'm really searching the "algebraic formula version" of this function.
EDIT 2: I forgot mentionning it, but I'm searching a solution without the $sign$ function.
 A: Sure, such a function exists.  The way you would generally write the formula for this function is
$$
f(x) = 
\begin{cases}
x & x \neq 0\\
1 & x = 0
\end{cases}
$$
This is called a "piecewise" definition of a formula.
Alternatively, we have the following one liner:
$$
f(x) = x+\lim_{b\to\infty}b^{-|x|}
$$
A: What about $$f(x)=x + 0^{x^2} $$ ?     

For the question of definition of $0^0$ see this paragraph in wikipedia
A: Probably not, in fact I would say most definitely no, under any usual meaning of the term "algebraic formula".  An algebraic formula, as I understand it, is basically going to be a rational function in one indeterminate, call it $x$, over the reals in the present case since the question inquires into functions with real arguments.  Thus it would be of the general form $\frac{p(x)}{q(x)}$, with $p(x)$ and $q(x)$ polynomials with real coefficients which we can assume have no common polynomial factor $k(x)$.  Since $f(0) = 1$, we must have $p(0) = q(0) \ne 0$.  But the fact that $f(x) \to 0$ as $x \to 0$ implies we must have $p(0) = 0$, $q(0) \ne 0$, a contradiction.
A: Yes, you have described the function well.  The lack of an algebraic formula doesn't stop it being a function.  All that is required is that there be exactly one value for each element of the domain.
A: If you are looking for a one-liner, you may try $f(x) = x|\mathrm{sgn}(x)|+1-|\mathrm{sgn}(x)|$.
A: $1 - (\text{sgn } x)^2 (1-x)$ ?
A: Answer addressing the poster's edits:
Note that if $f_1(x)$ and $f_2(x)$ are continuous functions, then their sum, product, difference, and composition are all continuous. And, their ratio is also continuous, unless the denominator equals zero at a point, in which case the function will be left undefined at that point! Since your function is discontinuous and defined at every point, it cannot be made using a finite number of products/sums/differences/compositions/ratios of continuous functions.
So, you'd have to allow either some infinite number of operations, or to start with a discontinuous everywhere-defined function.
A: How about $f(x) = x + \frac{\delta(x)}{\delta(x)}$, where $\delta$ is the Dirac-function?
