An example of an elementary function that acts on the real numbers as both the domain and the codomain could be f ( x ) = 2x . Every real number will be assigned a real number that is twice as big . An example of a function with the real numbers as both its domain and codomain is the function f ( x ) = 2x , which assigns to every real number the real number with twice its value .