I am trying to check results from Fortran code in maxima
What I want to do is read lines of data from a file (or stdin), calculate some results, and print a mesage if a comparison fails.
For example, I have files of data of the form
x1 y1 z1 f1
x2 y2 z2 f2
......
xn yn zn fn
where the entries are floating point numbers.
I want to:
- read the data in a line at a time
- calculate f(xi,yi,zi)
- compare f(xi,yi,zi) with fi
- generate some output if the comparison fails.
I have made some progress by transforming the file into straight line maxima code using awk, but was wondering if there was a more elegent solution.