minus static method

num minus(
  1. dynamic num1,
  2. dynamic num2, [
  3. List? others
])

精确减法

Implementation

static num minus(dynamic num1, dynamic num2, [List<dynamic>? others]) {
  if (others != null) {
    return minus(minus(num1, num2), others[0], others.length >= 2 ? others.sublist(1) : null);
  }
  num baseNum = pow(10, max(digitLength(num1), digitLength(num2)));

  return (times(num1, baseNum) - times(num2, baseNum)) / baseNum;
}