Consider two possible definitions for the function unitprice. One is the
definition given in Display 4.10. The other definition is the same except
that the type cast static_cast<double>(2) is replaced with the constant
2.0, in other words, the line
radius = diameter/static_cast<double>(2);
is replaced with the line
Are these two possible function definitions black-box equivalent?
Yes, the function would return the same value in either case, so the two