| OCR Text |
Show df [f ] will also be zero as well. The calculation can be terminated as soon as both input total differentials of a Boolean operation become zero. This early termination of redundant evaluations can save a great deal of computing time. Another useful optimization is incremental evaluation. If successive inputs differ in a small number of inputs, then expressions can be evaluated incrementally. In this case, the differences between successive inputs instead of their real values are used in the evaluation. Some modifications to the algorithm are necessary. Every time that input values to a Boolean operation change, partial derivatives Fx and Fy for that Boolean operation must be updated. Updates are done according to Table 4.4. The new values of partial derivatives can be obtained simply by adding two new expressions to Equation (4.6) of the original algorithm. The algorithm becomes: dF = (dx A Fx) 0 (dy A (Fy 0 (dx A Fxy))) Fx = Fx 0 (Fxy A dy) Fy = Fy 0 (Fxy A dx) evaluate(df,fp,fxy) int df[2*N-l], fp[2*N-l], fxy[N-l]; { int i,x,y; x = 2*N-2; y = 2*N-1; for (i = N-l, i > 0; i- ) { df[i] = (df[x] & fp[x]) ~ (df[y] k (fp[y] ~ (df[x] & fxy [i]))); x -= 2; y -= 2; > } 107 Figure 4.19. Evaluation |