use Array: all; #define toD(x) tod((x)) inline int[.] iotaXII(int y, int QUADio) { /* Index generator on scalar */ /* HELP! Needs domain check for negative shp */ ishp = toi(y); z = with( [QUADio] <= iv < [QUADio+ishp]) genarray( [ishp], iv[[0]]); return( z); } inline double[+] plusDDD(double x, double[+] y) { /* SxA scalar function */ xel = toD(x); z = with( . <= iv <= .) { yel = toD(y[iv]); } genarray(shape(y), plusDDD(xel,yel),0.0d); return(z); } inline double[+] plusDID(double x, int[+] y) { /* SxA scalar function */ xel = toD(x); z = with( . <= iv <= .) { yel = toD(y[iv]); } genarray(shape(y), plusDDD(xel,yel),0.0d); return(z); } double plusDDD(double x, double y) { return(toD(x)+toD(y)); } inline int[.], double[.] benlogdXID(int siz) { A_25=iotaXII( siz,0) ; A_26=plusDID(0.5,A_25); return(A_25,A_26); } int main() { n_0= 20000000; i, d=benlogdXID( n_0) ; return(i[[0]]+toi(d[[0]])); }