1 serial 0 Default %Library.RegisteredObject 1 Y cache 0 %Library.String document literal Y(X) Min=Y(X) . Set Sxy=Sxy+(X*Y(X)) . Set Sx=Sx+X . Set Sy=Sy+Y(X) . Set Sx2=Sx2+(X**2) If Cnt,(Cnt*Sx2-(Sx**2)) Do . Set m=Cnt*Sxy-(Sx*Sy)/(Cnt*Sx2-(Sx**2)) . Set b=Sy*Sx2-(Sx*Sxy)/(Cnt*Sx2-(Sx**2)) Else Set (m,b,Max,Min)=0 Quit m_D_b_D_Max_D_Min_D_Cnt ; Waar de formule is Y = mX + b ]]> %Library.CacheSerialState ^VHSys.L.MathS