According to gfortran documentation, INT(x)
and FLOOR(x)
both take input x
and convert x
to integer type. FLOOR
apparently only allows input of type REAL whereas INT
takes input of type INTEGER, REAL, and complex.
Is the allowed input type the only difference between INT
and FLOOR
? If so, can anyone explain why FLOOR
exists since it is apparently superfluous?
The "Similar Questions" box showed similar Stack Overflow questions in C, C++, and Python3, but apparently no one has asked this question for Fortran yet, which led me to getting this deep into asking it.
Including Fortran in my quick searches on Google and Stack Overflow meant nothing useful appeared. So this is admittedly a duplicate (unless Fortran has INT
and FLOOR
quirks separating it from C/C++/Python) but I think it will have utility in allowing the result to be more easily/quickly searchable.