You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The Probability() function can cast any real number to type Probability, not just those that are >= 0 and <= 1.
To Reproduce
a <- -13/12
type(a)
b := Probability(a)
type(b)
Expected behavior
RevBayes should throw an error message stating that the value is outside of the valid range for probabilities. It is not clear to me why this doesn't happen, since both the type constructor and the Real::convertTo() function check for this condition.
Screenshots
N/A
Computer info
RevBayes v1.2.1 on Red Hat Enterprise Linux 8.4 and macOS 12.6.5.
The text was updated successfully, but these errors were encountered:
Describe the bug
The
Probability()
function can cast any real number to type Probability, not just those that are >= 0 and <= 1.To Reproduce
Expected behavior
RevBayes should throw an error message stating that the value is outside of the valid range for probabilities. It is not clear to me why this doesn't happen, since both the type constructor and the
Real::convertTo()
function check for this condition.Screenshots
N/A
Computer info
RevBayes v1.2.1 on Red Hat Enterprise Linux 8.4 and macOS 12.6.5.
The text was updated successfully, but these errors were encountered: