Simple javascript calculator using Math.js