This function does not use any implicit conversions; all conversions
are done with static_cast.
It avoids multiplications and divisions when
it is known at compile time that one or more arguments is 1.
computations are carried out in the widest representation and only converted to
the destination representation at the final step.
— end note