difftreelog
fix sumx => sumx2
in: master
1 file changed
tests/src/calibrate.tsdiffbeforeafterboth126126127 const nb = new Fract(BigInt(n));127 const nb = new Fract(BigInt(n));128129 // This is a workaround to beat the lack of precision of the `Number` type.130 // We divide `BigInt`s. But since it is an integer division, we should take care of the precision on our own.131 // After the division we can convert the result back to the `Number` and then we set the correct precision.132 // It is crucial to have the correct slope for the regression line.133128134 const a = rpn(129 const a = rpn(135 [nb, sumxy, '*', sumx, sumy, '*', '-'],130 [nb, sumxy, '*', sumx, sumy, '*', '-'],136 [nb, sumx, '*', sumx, sumx, '*', '-'],131 [nb, sumx2, '*', sumx, sumx, '*', '-'],137 '/',132 '/',138 );133 );139 const b = rpn(134 const b = rpn(