Calculator: fix exponents in matrices

Change-Id: I28d267e50e37b9c363e050033a51a931598dad72
JIRA: CYAN-4382
Issue: https://jira.cyanogenmod.org/browse/CYAN-4382