Skip to main content
24-Ruby IV
October 31, 2020
Question

Why #2

  • October 31, 2020
  • 1 reply
  • 905 views

Why2.png

1 reply

25-Diamond I
October 31, 2020

Writing f(x):=... makes x an arbitrary variable - more precisely: the formal argument of the function. That way it has nothing to do with the variable x you defined earlier. So the attempt of the numerical evaluation therefore had to fail.

If you write f(x)= after defining the function, that x is the current argument of the function and for numerical evaluation it has to be either a constant value or a variable which had assigned a value before.