You are copying the integer part of 'P' into 'oldpress' and then not using 'oldpress' for anything. What did you want to do with 'oldpress'?
The parentheses around 'P' are not needed. oldpress = P; is sufficient to copy the integer part of 'P' into 'oldpress'.