Mathematics has no side effects.
Math cannot modify the value of a variable–either global or local. It cannot mutate an element in an array. And, a mathematical function always returns the same value for the same input.
The literal rendering of mathematics into code cannot contain side effects.
Mathematics is a purely functional language. — Translating math into code