steve-the-bayesian / BOOM

A C++ library for Bayesian modeling, mainly through Markov chain Monte Carlo, but with a few other methods supported. BOOM = "Bayesian Object Oriented Modeling". It is also the sound your computer makes when it crashes.
GNU Lesser General Public License v2.1
36 stars 15 forks source link

Condition 'p>=1' is always true #56

Closed steve-the-bayesian closed 3 years ago

steve-the-bayesian commented 3 years ago

Codacy detected an issue:

Message: Condition 'p>=1' is always true

The variable 'p' is a 'double' argument to a function. In the application 'p' is a probability so the assertion "p>=1" is always true is false. I'm getting this warning in several places, and consider it to be an error.

Occurred on:

Currently on:

steve-the-bayesian commented 3 years ago

This is a bug in codacy, not in Boom.