No point in ever doing ``const double&`` or ``const int&``, the size of the pointer is the same size as the actual value, so you can just return a double.  Specifically here it will cause you pain, since you are returning a reference to double which is temporary, so it may disappear once you go to use it.