This issue was found in JScience 4.3.1.
The Matrix.pow(int exp) method for (exp > 0) always does 'pow2 =
pow2.times(pow2)', even for exp==1 when it isn't needed. This can result in an
exception if the matrix contains Amount elements, and those elements are not
compatible (unit-wise) for this.times(this) matrix multiplication.