A small point about Fixed Point...

September 17, 2015

Fixed-point ?

The fixed-point of a function \(f(x)\) is a value \(x\) such that the equation \(f(x) = x\) is true.

For example, \(0\) is a fixed-point of the familiar trigonometric function \(sin\), since \(sin(0)=0\).

Starting with this simple definition, I was shown some amazing piece of programming by Prof. Gerald Jay Sussman in the legendary SICP course (lecture-2A to be specific).

Inspired by the lecture, I quickly scribbled the following piece of code verbatim in my Scheme environment.

And lo & behold!

The program I wrote JUST WORKED the first time itself!

Truly a testament to great teaching, and also to a great programming language (LISP that is–Scheme being a clean lit’l dialect of it :-) ).

Hat-tip to both! ♥️ 😊

Over to the code…

And then I tested it with the following calls to my fixed-point function:

The point?

Well, in the end, especially on seeing the different values in case of the \( sin() \) function, I realized one simple thing—even the so-called ‘fixed-point’ of a function ‘changes’.

Which reminds me of the saying:

❝ The ONLY constant in Life, is CHANGE! ❞ 😊

Happy Learning & Exploring with SICP ! :~)

comments powered by Disqus