How math works behind IK Spline Handle?

Hello everyone! My goal is to avoid “sliding” effect when deforming spline curve of IK Spline Handle. This effect:
GIF image

Using the current arclength and initial arclength I get this:
GIF image

ikSpline.offset = (currentLength/initialLengt-1) * 
(1/currentLength/initialLengt )

You can see it does not stay 100% statick. If I move the control further it starts sliding
Here is the screenshot of node editor:

Sorry for creating 3 posts. New users can’t use more than 1 embedded image in one post.

This is cool! I did something a bit similar here, if you skip to 1:05 - basically there are 3 issues you’re coming up against.

For one, measuring the exact length of a nurbs curve is mathematically impossible - usually the imprecision in maya is small enough to be negligible though.

The length is calculated through curve arc lengths, but applied through the straight-line distances between joints - sometimes those don’t line up exactly.

I think the main issue here is how the offset of an IK handle is calculated - it seems to be non-uniform. IE if you have a curve with 2 spans, an offset of 2 puts the start of the chain at the end of the curve.
If you multiply the ratio by the number of spans in the curve, does it make an improvement?

If you multiply the offset by the number of curve spans does it help?

Yes, I have tried to use number of spans as multiplier it does not work. The problem is that I don’t know Maya calculates offset of Ik Spline Handle.
I have another idea. To use the same system but applied to Motion Path based setup. Calculate U value of Motion Path node.