Discussion Overview
The discussion revolves around the inquiry into the source code for intrinsic functions in Fortran 90/95, specifically how to access the underlying implementations of functions like sqrt, sin, and cos. Participants explore the nature of these functions, their implementation, and the availability of source code.
Discussion Character
- Exploratory
- Technical explanation
- Debate/contested
Main Points Raised
- One participant asks how to view the source code for intrinsic functions in Fortran, specifically for sqrt.
- Another participant suggests that the code is generated by the compiler and can be viewed through assembly code output or a debugger's disassembly mode.
- A participant clarifies that they are interested in the mathematical algorithms behind intrinsic functions, indicating that these functions are based on specific algorithms for computation.
- It is mentioned that library source code for open-source compilers, such as g95, may be accessible, but understanding it requires knowledge of numerical analysis.
- A participant expresses interest in the source code for gfortran, noting its open-source status.
- Another participant humorously remarks on the potential confusion between "open source" and actual availability of source code, sharing their difficulty in finding a link to gfortran's source code.
- One participant points out that many intrinsic functions are implemented as hardware floating-point instructions, suggesting that the algorithms used may be proprietary and not publicly available.
Areas of Agreement / Disagreement
Participants express differing views on the availability and nature of the source code for intrinsic functions. While some suggest that open-source compilers may provide access to the source code, others highlight the proprietary nature of hardware implementations, indicating a lack of consensus on the accessibility of the underlying algorithms.
Contextual Notes
Participants note that understanding the source code may require a solid background in numerical analysis, and there is uncertainty regarding the proprietary nature of hardware algorithms used in intrinsic functions.