Skip to content

Commit d1a84bf

Browse files
committed
Cast integer to double. Solves issue #10.
1 parent d51b808 commit d1a84bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/beast/evolution/substitutionmodel/LewisMK.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void getTransitionProbabilities(Node node, double fStartTime, double fEnd
105105
matrix[r + i] += e1;
106106
}
107107
} else {
108-
double fDelta = (nrOfStates / (nrOfStates - 1)) * (fStartTime - fEndTime);
108+
double fDelta = (nrOfStates / (nrOfStates - 1.0)) * (fStartTime - fEndTime);
109109
double fPStay = (1.0 + (nrOfStates - 1) * Math.exp(-fDelta * fRate)) / nrOfStates;
110110
double fPMove = (1.0 - Math.exp(-fDelta * fRate)) / nrOfStates;
111111
// fill the matrix with move probabilities

0 commit comments

Comments
 (0)