function sameSign(x1,x2){
	if (x1>0 && x2<0 || x1<0 && x2>0 ){
		return false;
	}else{
		return true;
	}
}

function POW(x,y){
	var p=eval(x);
	var q=eval(y);
	return Math.pow(p,q);
}

function COS(x){
	return Math.cos(x);
}

function COSRAD(x){
	x=x*Math.PI/180;
	return Math.cos(x);
}

function SIN(x){
	return Math.sin(x);
}

function SINRAD(x){
	x=x*Math.PI/180;
	return Math.sin(x);
}

function TAN(x){
	return Math.tan(x);
}

function TANRAD(x){
	x=x*Math.PI/180;
	return Math.tan(x);
}

function COT(x){
	return 1/Math.tan(x);
}

function COTRAD(x){
	x=x*Math.PI/180;
	return 1/Math.tan(x);
}

function SEC(x){
	var y=1/Math.cos(x);
	if (y==Infinity){
		y=1000;
	}
	return y;
}

function SECRAD(x){
	x=x*Math.PI/180;
	var y=1/Math.cos(x);
	if (y==Infinity){
		y=1000;
	}
	return y;
}

function COSEC(x){
	var y=1/Math.sin(x);
	if (y==Infinity){
		y=1000;
	}
	return y;
}

function COSECRAD(x){
	x=x*Math.PI/180;
	var y=1/Math.sin(x);
	if (y==Infinity){
		y=1000;
	}
	return y;
}




function SQRT(x){
	return Math.sqrt(x);
}

function SINH(x){
	return (Math.exp(x)-Math.exp(-x))/2;
}

function COSH(x){
	return (Math.exp(x)+Math.exp(-x))/2;

}
function SECH(x){
	return 2/(Math.exp(x)+Math.exp(-x));
}
function COSECH(x){
	return 2/(Math.exp(x)-Math.exp(-x));
}
function TANH(x){
	return (Math.exp(2*x)-1)/(Math.exp(2*x)+1);
}
function COTH(x){
	return (Math.exp(2*x)+1)/(Math.exp(2*x)-1);
}
function ASINH(x){
	return Math.log(x+Math.sqrt(x*x+1));
}
function ACOSH(x){
	return Math.log(x+Math.sqrt(x*x-1));
}
function ATANH(x){
	return Math.log((1+x)/(1-x))/2;
}
function ACOTH(x){
	return Math.log((x+1)/(x-1))/2;
}
function ASECH(x){
	return Math.log(1/x+Math.sqrt(1/(x*x)-1));
}
function ACOSECH(x){
	return Math.log(1/x+Math.sqrt(1/(x*x)+1));
}


function BLANC(x){
	var temp;
	var result=0;
	var count;
	for (count= 0;count<=49;copunt++){
		x=x-Math.round(x-(x<0));
		if (x<0.5){temp=x;}else{temp=1-x;}
		result=result+ temp/(Math.pow(2,count));
		x=2*x;
	}
	return result;
}