@yuqing19118, based on @khabbazian's comment here, I think that the division by 2*α should be made earlier on the branches of the tree, instead of later on the 2 matrices (square-root and inverse square-root). If small α values caused huge branch lengths and numerical errors due to a tiny inverse square-root matrix, it's best to rescale the branch lengths first, than to allow for huge branch lengths, run the square-root matrix calculation on them, and rescale the 2 matrices (one huge, one tiny) at the end.
I think that we should make this other change before a pull request. Advice welcome Mohammad!
@yuqing19118, based on @khabbazian's comment here, I think that the division by 2*α should be made earlier on the branches of the tree, instead of later on the 2 matrices (square-root and inverse square-root). If small α values caused huge branch lengths and numerical errors due to a tiny inverse square-root matrix, it's best to rescale the branch lengths first, than to allow for huge branch lengths, run the square-root matrix calculation on them, and rescale the 2 matrices (one huge, one tiny) at the end.
I think that we should make this other change before a pull request. Advice welcome Mohammad!