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

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