      // amount, the array is not constant, and the assertion passes.
            return;
          }
        }
        assert_unreached(`${description}: unexpectedly constant`);
      }

      function assert_all_close(arr, value, description) {
        for (const x of arr) {
          assert_approx_equals(x, value, Number.EPSILON, description);
        }
      }

      function assert_all_constant(arr, value, description) {
        for (const x of arr) {
          assert_equals(x, value, description);
   