Update Math.js

changed from index.getElementById to document.getElementById