| | |
| | | // 处理excel函数参数列表 |
| | | item.valueList.forEach((a) => { |
| | | valueList.push({ |
| | | name: `${comparisonList.find((e) => e.value == a.c).label}${ |
| | | a.r + 1 |
| | | name: `${comparisonList.find((e) => e.value == a.c).label}${a.r + 1 |
| | | }`, |
| | | value: 0, |
| | | }); |
| | |
| | | console.log("error", error); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 实现平方根函数 SQRT |
| | | * @param {number} num 要开平方的数字 |
| | | * @returns {number} 算术平方根,负数返回 NaN |
| | | */ |
| | | function SQRT(num) { |
| | | // 实数范围内,负数没有平方根,返回 NaN |
| | | if (num < 0) { |
| | | return NaN; |
| | | } |
| | | // 调用 JS 原生高精度平方根函数 |
| | | return Math.sqrt(num); |
| | | } |
| | | |
| | | /** |
| | | * 获取包含 ABC 字符的列表 |
| | | * |
| | |
| | | "INT", |
| | | "IF", |
| | | "LOG", |
| | | "SQRT" |
| | | ]; |
| | | // 替换特殊字符 |
| | | f = f |