Phil Steitz wrote:
Just replace the return statement by :
Math.amx(0, sumYY - sumXY * sumXY / sumXX);
Sounds good.
Well, the majority of the num math text books on my shelf actually
recommend computing the sum of the squared errors instead of the
algebraic equivalent form given in the more analytically oriented
text books (and used above). This is, of course, more complicated
and still prone to adverse numerical effects unless the sequence
is also sorted.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]