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

  • Thread starter Thread starter nnnnn
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
To write "sgn[Im(z)]" in Fortran, it is suggested to use the SIGN function, which determines the sign of a number. However, there is uncertainty regarding how the SIGN function handles complex numbers in different compilers. It may be advisable to separate the real and imaginary components of a complex variable into distinct variables for better control. The discussion also touches on the need to include specific headers in the Fortran code, although details on which headers are necessary are not provided. Overall, clarity on the handling of complex numbers and the use of the SIGN function is emphasized.
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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
21
Views
3K
Replies
17
Views
6K
Replies
59
Views
11K
Replies
2
Views
2K
Replies
8
Views
4K
Replies
4
Views
5K
Replies
9
Views
2K
Back
Top