free hit counter

Monday, February 20, 2006

awk: max error

here's a humdinger of my own devising which prints out the max absolute difference between host and target calculations on a math engine calculation I think may be out of spec:


....
TestFirEngine.h:667: Trace: "input: 0.0005 host: 0.0223607 target: 0.041757"
....
$ nmake run | awk '/input:/ {x=$4; hY=$6; tY=$8; l= sqrt((tY-hY)*(tY-hY)); if (l>maxDelta) {maxDelta=l; maxX=x;}} END {print maxX, maxDelta}'


more awk examples

0 Comments:

Post a Comment

<< Home