cos() in JavaScript

function doMath(){
        var inputNum=document.form1.input.value;
        var result = Math.cos(inputNum);
        document.form1.answer.value = result;
    }