#3139 "divide by zero" in ::math::statistics::linear-model

obsolete: 8.4.9
closed-invalid
5
2005-05-17
2005-05-17
tenolohi
No

In version 0.1.2 of math::statistics library, function linear-
model crashes with "divide by zero" error message if all
independent data are the same. There is a check in the
code like this:

if { $sumx2 == 0.0 } {
return -code error -errorcode
ARG "$TOOFEWDATA: independent values are all the
same"
}

, but this is not correct. Instead the condition should
probably be if { $sx == 0.0 } which is calculated on the
next line after the check.

Discussion

  • Logged In: YES
    user_id=79902

    I think you've submitted this to the wrong project. It looks
    like a tcllib bug, not a tcl bug. :^)

     
    • status: open --> closed-invalid
     
  • tenolohi
    tenolohi
    2005-05-17

    Logged In: YES
    user_id=1280029

    Oops! :)

    I'll submit it to the right project, so you can delete this one...