I tend to use math functions of constant expressions for convinience and coherence (i.e log(x)/log(2) instead of log(x)/0.3...). Since these functi
log(x)/log(2)
log(x)/0.3...
It depends. If the compiler can do the math exactly as it would be done at runtime, and if link time optimizations are performed, and if the library is kept in some sort of intermediate form, then yes it could be done.
Most compilers don't do all of that.