Subject: Computational Hash
Generally, you would have to standardize input for whitespace, delimiters, and the presentation of the operations. In linux, you could simply use a math app and shell script your parsing.
1)Error-check input; cleanse/fix/deny
1.5) Hash the input string and log to file
2)If you want to verify middle computations, within a custom program, every function would need input error-checking. Most programmers do that except for pre-compiled libraries, which means you would have to re-write even basic computational libraries. It would greatly slow down an application or script. I assume the point of this would be to check if the application has been intercepted or something like that, say, from some hacker's sandbox. Doing this only opens you up to having the log file altered. Malware would do this if that was your thought process. Otherwise, no. Why waste time hashing throughput, logging within a computation?
3) Hash the output and log.
If you standardize the input with error-checking, that is most of your battle. You can log everything, then hash the log. Tons of options. I don't see your mission there. If you have interception risk, you have more important security priorities to handle. Start with physical security and work your way inward.
Professional security-wise, the only option for violation is to try and hash verify memory pagefile access for in-memory hack? Helheimr. Easier in linux, I would like to not care about that. I bet there is some common-sensed wisdom missing.
Prevention and diagnostic slows down any process, which is why 50% of security is still on the tail-end of the problem. Don't cut your wrists over that philosophy. If gaping security holes on the OS were actually addressed, a good portion of the IT industry would lose it's job and the government would go nuts trying to penetrate for digital evidence.
My 2 cents: I recently bought a Windows Phone. Because it sandboxes every app, and forces people to pay for the studio before making money on an app, it is hated by hackers and anti-Microsoft people. As a result, it is the least hacked phone thus far. I love linux also, but people are blatantly information planting when, in fact, it is a great phone. This phone, with its encrypted SD, proves that Microsoft can make a secure client OS. They just choose not to, opting for fluff and gui instead. ReFS is not consumer ready, but it lacks alternate data streams which needed to die eons ago. I still have to use netsh to disable Teredo. It is a culture of making business, the antithesis to being efficient and secure.