blackwinter / rb-gsl

Ruby interface to the GNU Scientific Library [Ruby 2.x and GSL 1.16 compatible fork of the gsl gem]
https://blackwinter.github.io/rb-gsl
Other
27 stars 7 forks source link

Division in GSL::Oper probably broken for GSL::Vector::Col #9

Closed blackwinter closed 9 years ago

blackwinter commented 9 years ago

numeric / other, where other is a GSL::Vector::Col or GSL::Vector::Int::Col, is calculated without taking numeric into account:

other.scale(1.0 / GSL.pow_2(other.dnrm2))

Maybe it should look like this instead:

other.scale(self / GSL.pow_2(other.dnrm2))