whole number constants



This may be a dumb question but what is "best practice" when coding
whole numbers in real (kind specified) formulas. I am looking for
accuracy, consistancy and prortability reagardless of what value dp
has below. Many of my calcs have numerical cancellations or accuracy
checks as per the error function below. What are the pitfalls?

for example:

integer, parameter :: dp = selected_real_kind(15, 307)

real(dp) :: x,xnew

real(dp), parameter :: one = 1.0_dp
real(dp), parameter :: onend = 1_dp
real(dp), parameter :: onenk = 1.0
real(dp), parameter :: onei = 1

! which should I use ?

10 error = one-xnew/x
20 error = onend-xnew/x
30 error = onenk-xnew/x
40 error = onei-xnew/x

! or the more ledgable ?

50 error = 1-xnew/x

! or the slightly less ledgable ?

60 error = 1_dp-xnew/x

Thanks for any advice.

.