2

The question is trivial, but I couldn't find a definitive answer so far. When using one of fortran's intrinsic mathematical functions, such as sqrt(x) with double precision input, will the result also be computed in double precision? In other words: Are these intrinsic funtions interfaces which call different functions depending on the kind of the input? I know that specific subroutines like dsqrt(x) exist for double precision, but I also know that double precision was changed from a separate data type to a kind of the real type at some point, so is there any difference between sqrt and dsqrt in fortran 90 and newer?

Ian Bush
  • 6,996
  • 1
  • 21
  • 27
Jakob Filser
  • 131
  • 9

0 Answers0