Hi Sergey, On Sun, May 9, 2010 at 10:15 AM, Sergey Bochkanov <[email protected]> wrote: > Hello, Francesco. > > I know about expression templates, but even with templates sometimes > creation of temporary is the only way to calculate value of a complex > expression like "x = ((a+b)*(c+d)-e)/(f+3)". Am I wrong? > > ALGLIB is full of code like this.
If the expression is to be intended like this: for i in (0,size): x[i] =((a[i] + b[i]) * (c[i] + d[i]) - e[i]) / (f[i] + 3) (i.e., element-wise), then I'm pretty confident expression templates could eliminate all temporaries. Cheers, Francesco. -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
