3 ms·
Multiplying by a number raised to the zero-th power is a NOP. This comes up frequently in the context of polynomials, where the constant term is often expresse
by gizmo686 6y ago
Multiplying by a number raised to the zero-th power is a NOP.
This comes up frequently in the context of polynomials, where the constant term is often expressed as the x^0 term.
E.g in f(x) = 3x^2 + 2x^1 + 1x^0 , we would like to have f(0)=0.
In many cases this is important because we express polynomials as a sum:
f(x) = sum (n from 0 to 2) { (n+1)x^n }, so having x^0 behave reasonably at x=0 allows us to avoid needed to special case the n=0 term.