I have a book which says:
If a function $f$ satisfies $f(-x)=f(x)$ for all $x$ in its domain, then $f$ is called an even function. However, if $f(-x)=-f(x)$ for every $x$ in the domain of $f$, then $f$ is called an odd function.
But this is not clear. Because it does not mention what happens when, for a particular function, $a$ is in its domain but $-a$ isn't. The ambiguity arises in a function like $f:\{-5,-1,0,1,6\} \to \{-6,0,1,5\}$ given by $f(-5)=5, f(-1)=f(1)=1, f(0)=0$ and $f(6)=-6.$ We cannot decide in which one of the following categories the function $f$ falls:
1. Both odd and even,
2. Odd,
3. Even, and
4. Neither odd nor even.
[This is because I assumed that no one wants a fifth category like "can't decide".]
For that, can anybody please state the formal non-ambiguous definitions of odd and even fuctions? And also, regarding a problem such as this, can anybody tell me if there is any international body of Mathematics (like IUPAC is there for Chemistry), which decides which definitions and conventions to adopt and if it exists, how can I find those rules?
I know such a question might sound silly, but I have a set of questions for interviews which has the following question:
"Give an example of a function which is both odd and even. Is your choice unique?" - The answer to the second part of the question depends on the precise definition of odd and even functions.