Bug corrected

The problem is like this:

You want to divide L into n segaments, and then add them back.

However, somehow what are added back are n+1 segaments.

To make things more confusing, n depends on frequency.