How can you write sgn[Im(z)] in fortran?

  • Context: Fortran 
  • Thread starter Thread starter nnnnn
  • Start date Start date
  • Tags Tags
    Fortran
Click For Summary
SUMMARY

The discussion focuses on implementing the function "sgn[Im(z)]" in Fortran, specifically addressing the handling of complex numbers. Users are advised to check the Fortran compiler's documentation, particularly the IBM XL Fortran documentation, to understand how the "SIGN" function operates with complex types. It is recommended to manage the real and imaginary components of complex numbers separately for clarity and compatibility. The conversation emphasizes the importance of understanding the specific compiler's capabilities regarding complex number operations.

PREREQUISITES
  • Fortran programming language knowledge
  • Understanding of complex numbers in programming
  • Familiarity with the "SIGN" function in Fortran
  • Access to compiler documentation, specifically IBM XL Fortran
NEXT STEPS
  • Research the implementation of complex numbers in Fortran
  • Learn how to separate real and imaginary components in Fortran
  • Explore the "SIGN" function and its behavior with different data types
  • Review the IBM XL Fortran documentation for complex number support
USEFUL FOR

Fortran developers, programmers working with complex numbers, and anyone looking to understand the nuances of the "SIGN" function in Fortran.

nnnnn
Messages
5
Reaction score
0
How can you write "sgn[Im(z)]" in fortran?

Hello everybody;


How can you write "sgn[Im(z)]" in fortran? , then what do

you need to add in the header?

also what does "sign(a,b)" mean?


Much Thanks in advance
 
Technology news on Phys.org


I'm not sure how your compiler will handle SIGN with complex numbers. It may be useful for you to keep track of the real/imaginary components separately in different variables rather than using a single COMPLEX variable.

If it does work with complex numbers though, then great.
 

Similar threads

  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 59 ·
2
Replies
59
Views
12K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K