When to use a variable vs simple value returning function

There’s :math.pi() in erlang.