I do not quite understand the difference between the codomain and the range.

given:

$\displaystyle f:\mathbb{E}\rightarrow \mathbb{Z}$

State the domain, codomain, and range of:

$\displaystyle f(x)=\left |x \right |;x\in \mathbb{E}$

My answer:

Domain: $\displaystyle \mathbb{E}$

Codomain: $\displaystyle \mathbb{Z}$

Range:$\displaystyle \mathbb{Z}^+$

The books answer:

Domain:$\displaystyle \mathbb{E}$

Codomain:$\displaystyle \mathbb{Z}$

Range:$\displaystyle \left (\mathbb{Z}^{+}\cap \mathbb{E}\right )\cup \left \{ 0 \right \}$

I just don't get how I should specifie the range, or really what the difference between the codomain and range is.

Any help? thx

$\displaystyle \int$