moved truncation function inside Calculator functionality so that lastResult is the truncated value.