//消除js计算误差,add、reduce是传入的加减数字,reduce是被加数（被减数），s是加减符号
export function addAndsub(add,reduce, s, num){
	let m = Math.pow(10, num); //num是10的次幂
	let res = s == '+' ? (add * m + reduce * m) / m : (add * m - reduce * m) / m;
	return Math.round(res * m) / m;
}