import Decimal from 'decimal.js';
// 加法
function add(...nums: number[]): number {
return nums.reduce((total, num) => new Decimal(total).plus(num), 0).toNumber();
}
// 减法
function subtract(...nums: number[]): number {
return nums.reduce((total, num) => new Decimal(t...