What is the reason for the `const double&`?
A `double` is usually enough, since it doesn't require dereferencing any pointer, it will be more easily optimized by the compiler.