how are the math node operations in cycles calculated?
Here is a list of the mathematical equivalents of each operation.


Add: Out = Value1 + Value2.
Subtract: Out = Value1 - Value2.
Multiply: Out = Value1 * Value2.
Divide: Out = Value1 / Value2.
Sine: Out = Sin(Value1).†
Cosine: Out = Cos(Value1).†
Tangent: Out = Tan(Value1).†
Arcsin: Out = Sin⁻¹(Value1).†
Arccosine: Out = Cos⁻¹(Value1).†
Arctangent: Out = Tan⁻¹(Value1).†
Power: Out = Value1 ^ Value2.
Logarithm: Out = log(Value2, Value1).††
Minimum: Out = Smaller Value of (Value1, Value2).
Maximum: Out = larger value of (Value1, Value2).
Round: Out = Value1 rounded to nearest integer.
Less Than: Out = 1 if Value1 &lt; Value2, else 0'
Greater Than: Out = 1 if Value1 &gt; Value2, else 0'
Modulo: Out = Value1 (mod Value2).‡


Note that some operations use only the first input, in such cases the second input is ignored completely.

†. All trigonometric functions use radians.
††. log(x, y) = the logarithm of x to the base y.
‡. x mod y = the remainder when x is divided by y.