                                .pair(.makeNumber(res + rhs), .null)))
         }
       case .bignumPair(let lhs, let rhs):
+        guard !rhs.isZero else {
+          throw RuntimeError.eval(.divisionByZero)
+        }
         let res = lhs % rhs
         if res.isNegative == rhs.isNegative {
           return .values(.pair(.makeNumber((lhs - res) / rhs), .pair(.makeNumber(res), .null)))

  private func floorQuotient(_ x: Expr, _ y: Expr) throws -> Expr {
    switch try NumberPair(x, y) {
      case .fixnumPair(let lhs, let rhs):
        let res = lhs % rhs
        return .makeNumber(((res < 0) == (rhs < 0) ? (lhs - res) : (lhs - res - rhs)) / rhs)
      case .bignumPair(let lhs, let rhs):
        let res = lhs % rhs
        return .makeNumber((res.isNegative == rhs.isNegative ? (lhs - res)
                                                             : (lhs - res - rhs)) / rhs)

  private func truncateQuotient(_ x: Expr, _ y: Expr) throws -> Expr {
    switch try NumberPair(x, y) {
      case .fixnumPair(let lhs, let rhs):
        guard rhs != 0 else {
          throw RuntimeError.eval(.divisionByZero)
        }
        return .makeNumber(lhs / rhs)
      case .bignumPair(let lhs, let rhs):
        guard !rhs.isZero else {
          throw RuntimeError.eval(.divisionByZero)
        }
        return .makeNumber(lhs / rhs)
      case .flonumPair(let lhs, let rhs):
        guard Foundation.trunc(lhs) == lhs else {
