fix for wrong results and stack overflow error from BivariateRegression PR: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24747 Obtained from: Submitted by: Sergei Skarupo, Brent Worden Reviewed by: Mark Diggory