The straight line is a polynomial. ALL polynomials have real numbers as its domain.
The exponential functions f(x) and g(x) both have the form b^x or b^(-x). Both these exponential functions have a real domain, but the range of both are limited to strictly positive numbers.