I have a project where the customer requirement specifies a report and contains mathematical equations for the contents of some of the columns on that report. One of the columns on this report is a running total which starts at a opening value, and which 'should' remain at that opening value all the way down the report because the other stuff balances out. I.e. if something had gone missing, the value would change and the customer would see that there is a problem.
The reason I quoted the 'should' in that last paragraph is because the spec defines an equation for this column, and I can mathematically prove that it cancels out to 'the value from the previous row'. In other words, the value will never ever change from the opening value.
So my options are:
- Implement the equation as spec'd, I suspect the interpreter will not resolve the equation so there will be a performance hit
- Do some cancelling out, and implement the column value as 'value from the previous row'
- Send the question back up the chain to the customer and risk missing the deadline because of several days lost to bureaucracy and impromptu math 101 lessons to explain the difference between "yeah, it'll never change, it's there just in case" and "it. will. never. change."
I've pretty much decided what I'm going to do, but I thought it was an interesting question. What do you think is the professional thing to do?