In[]:=
EstimatedArc[l_]:=​​l//Differences//(e
2
e
)//Transpose//Total//Sqrt//(eFoldList[Plus,0,e])//e
e
e[[-1]]
​​EstimatedArcC=Compile{{l,_Real,2}},​​l//Differences//(e
2
e
)//Transpose//Total//Sqrt//(eFoldList[Plus,0,e])//e
e
e[[-1]]
​​;​​​​EstimatedArcM=Compile[{{l,_Real,2}},​​EstimatedArc[l]​​];
In[]:=
{{0,0},{1.,0},{10.,0}}//EstimatedArc​​{{0,0},{1.,0},{10.,0}}//EstimatedArcC​​{{0,0},{1.,0},{10.,0}}//EstimatedArcM
Out[]=
{0.,0.1,1.}
Out[]=
{0.,0.1,1.}
CompiledFunction
:Could not complete external evaluation at instruction 1​; proceeding with uncompiled evaluation.
Out[]=
{0.,0.1,1.}