public Vector multiply(double value) {
    double[] result = toArray();
    for (int i = 0; i < result.length; i++) result[i] *= value;
    return new Vector(result);
  }
public Vector multiply(double value)