Result = (1.0D+0 + DBLE( Input rate)/ 1.0D + 5) ** (1.0D+0/1.2D+1) - 1.0D+0
A = idnint4 (result*1.0D+9);
These two lines of fortran code are confusing. I've converted many Fortran codes to C. But I fail to understand here why the author adds 1.0D+0 to the variable. It doesn't have an effect on the variable, no? Also idnint equivalent would be nint, which is not available in C library. Please remember I can use only C compiler, not even C++ compiler.
Can any Fortran expert guide me through this?
Update: I'm sorry to have confused you all regarding this. I do understand that 1.0D+0 is equal to 1. And adding that 1 definitely changes the value. What I meant was that what change does it make to write 1 as 1.0D+0? Trying to make that expression double? In that case, the variable 'input rate' if declared as double should be enough - no? I mean, if you add a double variable and a constant, the addition value should be double, no? Why try to make that whole expression double by using double in every part of the syntax?