private static double _toDoubleValue(Array array, int i) throws ExpressionException {
Object obj = array.get(i,null);
if(obj==null)throw new ExpressionException("there is no element at position ["+i+"] or the element is null");
double tmp = Caster.toDoubleValue(obj,Double.NaN);
if(Double.isNaN(tmp))
throw new CasterException(obj,Double.class);
return tmp;
}