1

If I have data $a,b,c,d$, and want to calculate $x=a+b-c-d$, $y=a-b-c+d$ and $z=a+b+c-d$,
I can save three adds by doing $e=a-c$, $f=b-d$, then $x=e+f$,$y=e-f$, $z=a+c+f$.
If I have 100 data values $a_1..a_{100}$ and twenty sum/differences $x_1..x_{20}$,
how can I find ways to cut down the number of plusses and minusses needed?

Empy2
  • 50,853

0 Answers0