How to define constant expressions in shader

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By oinkl
const float arg = log(0.1);

Expected constant expression after ‘=’

How do I initialise constant expressions in shaders with expressions containing log, exp, sin, etc.?