Discussion Overview
The discussion revolves around the use of real versus double precision in Fortran 90, particularly in the context of numerical calculations involving complex values. Participants explore the implications of precision on performance, memory usage, and the handling of complex data types in different compilers.
Discussion Character
- Exploratory
- Technical explanation
- Debate/contested
- Mathematical reasoning
Main Points Raised
- One participant inquires about guidelines for choosing between real and double precision variables, especially for complex final values.
- Another participant notes that performance differences depend on hardware and compiler optimizations, suggesting that double precision may not incur a speed penalty on modern platforms.
- Concerns are raised about the support for double precision complex types in various compilers, with one participant mentioning issues with the gnu g95 compiler.
- Some participants advocate for using double precision by default to ensure accuracy, suggesting that performance considerations should come after ensuring correctness.
- There are discussions about the historical performance of double precision complex arithmetic in Fortran implementations, with some participants expressing skepticism about certain compilers' capabilities.
- One participant shares a test case to evaluate the precision of complex arithmetic in a specific Fortran implementation, noting unexpected results related to exponent handling.
- Another participant questions the FORTRAN standard regarding the default format for printing floating-point numbers, indicating a concern about precision in output.
Areas of Agreement / Disagreement
Participants express a mix of agreement on the importance of double precision for accuracy, while also highlighting differing experiences with compiler support and performance implications. The discussion remains unresolved regarding the best practices for handling complex types and the reliability of various compilers.
Contextual Notes
Limitations include varying support for double precision complex types across different compilers and potential discrepancies in performance based on hardware configurations. Some participants note that their tests reveal unexpected behavior in certain compilers, particularly regarding precision and exponent handling.
Who May Find This Useful
This discussion may be useful for physics students and programmers working with Fortran who are interested in numerical computations, particularly those involving complex numbers and precision considerations.