@Override
  public SelDouble assignOps(SelOp op, SelType rhs) {
    SelTypeUtil.checkTypeMatch(this.type(), rhs.type());
    double another = ((SelDouble) rhs).val;
    switch (op) {
      case ASSIGN:
        this.val = another;
        return this;
      case ADD_ASSIGN:
        this.val += another;
        return this;
      case SUB_ASSIGN:
        this.val -= another;
        return this;
      case MUL_ASSIGN:
        this.val *= another;
        return this;
      case DIV_ASSIGN:
        this.val /= another;
        return this;
      case MOD_ASSIGN:
        this.val %= another;
        return this;
      default:
        throw new UnsupportedOperationException(
            "float/Float/double/Doubles DO NOT support assignment operation " + op);
    }
  }
@Test
  public void testAssignOps() {
    SelDouble obj = SelDouble.of(2.2);
    SelDouble res = one.assignOps(SelOp.ASSIGN, obj);
    assertEquals(2.2, res.doubleVal(), 0.01);
    res = one.assignOps(SelOp.ASSIGN, SelDouble.of(3.3));
    assertEquals(2.2, obj.doubleVal(), 0.01);
    assertEquals(3.3, res.doubleVal(), 0.01);
    res = one.assignOps(SelOp.ADD_ASSIGN, obj);
    assertEquals(5.5, res.doubleVal(), 0.01);
    res = one.assignOps(SelOp.SUB_ASSIGN, obj);
    assertEquals(3.3, res.doubleVal(), 0.01);
    res = one.assignOps(SelOp.MUL_ASSIGN, obj);
    assertEquals(7.26, res.doubleVal(), 0.01);
    res = one.assignOps(SelOp.DIV_ASSIGN, obj);
    assertEquals(3.3, res.doubleVal(), 0.01);
    res = one.assignOps(SelOp.MOD_ASSIGN, obj);
    assertEquals(1.1, res.doubleVal(), 0.01);
  }