In this case, the ampersand does not mean taking an address, but it denotes a reference. Here, f
is a function that takes a reference to double as parameter and returns a reference to double.
You might want to read about C++'s references in your textbook of choice, since they are a very basic part of the language.