1.bugfix. mumatrix calculation errors in Forward-backward algorithm.
2. add test for derivatives calculation.