constant function
nounUK /ˈkɒnstənt ˈfʌŋkʃən/
US /ˈkɑːnstənt ˈfʌŋkʃən/
A constant function is a math rule that always gives the same answer, no matter what number you put in.
The function f(x) = 5 is a constant function because it always equals 5.
OTHER MEANINGS
2. In programming, a function that always returns the same output for the same input and has no side effects.
The compiler optimized the constant function because its result never changes.
3. A mathematical mapping whose output value does not depend on the input variable.
Every point on the graph of a constant function lies on a horizontal line.
4. A function whose derivative is zero everywhere it is defined.
Since its slope is always zero, a constant function has a derivative of 0.