@Override
    public Value add(Value value) {
        if (value instanceof TensorValue)
            return value.add(this);

        try {
            return mutable(this.value + value.asDouble());
        }
        catch (UnsupportedOperationException e) {
            throw unsupported("add",value);
        }
    }
Create a double which is frozen at the outset.
searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/DoubleValue.java