public static double getFunctionValue(String token) throws Exception {  
    	double result=0.0;
    	String origin=token;//һ
    	token=token.replaceAll("\\p{Space}", "");	//Ҫȥ֮Ŀհ
    	//Ǻ
        if(token.startsWith("sin(")){//
        	result=sin(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("cos(")){//
        	result=cos(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("tan(")){//
        	result=tan(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }
        //Ǻ
        else if(token.startsWith("arcsin(")){
        	result=arcsin(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("arccos(")){
        	result=arccos(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("arctan(")){
        	result=arctan(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }
        //˫
        else if(token.startsWith("sinh(")){
        	result=sinh(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("cosh(")){
        	result=cosh(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("tanh(")){
        	result=tanh(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }
        //
        else if(token.startsWith("log(")){
        	result=log(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("log10(")){
        	result=log10(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("ln(")){
        	result=ln(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }
        //ָͽ׳
        else if(token.startsWith("pow(")){
        	result=pow(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("exp(")){
        	result=exp(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("fact(")){//׳
        	result=fact(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }
        //ģͿ
        else if(token.startsWith("mod(")){
        	result=mod(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("sqrt(")){
        	result=sqrt(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("cuberoot(")){
        	result=cuberoot(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("yroot(")){//xyη
        	result=yroot(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }
        //ͳƺ
        else if(token.startsWith("avg(")){
        	result=avg(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("sum(")){
        	result=sum(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("var(")){//㷽
        	result=var(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("varp(")){//巽
        	result=varp(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("stdev(")){//׼
        	result=stdev(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else if(token.startsWith("stdevp(")){//׼
        	result=stdevp(token.substring(token.indexOf('(')+1, token.lastIndexOf(')')));
        }else{
        	throw new Exception(ERROR_MESSAGE[UNKNOWN_FUNCTION]+": "+origin);
        }
        
        //System.out.println(token+"="+result);
        return result;
    }