[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] complex square root



Dear scott,

yes it should be possible, if you use the data type complex

Example:

        program cNum
        
        complex a
        
        a = sqrt((-1,0))
        
        write (*,*) a
        
        pause
        
        end

Should give you the output (0.0000000,1.0000000)

Best regards,
Hermann Schranzhofer.


_______________________________________________________________

 DI Dr. mont. Hermann Schranzhofer
 Institut fuer Waermetechnik / Institute of Thermal Engineering
 TU Graz / Graz University of Technology  	
 Inffeldgasse 25 / B, A-8010 Graz	
 
 Tel.:  +43 316 873 7314
 mobil: +43 664 60 873 7314
 Fax :  +43 316 873 7305
 http://www.iwt.tugraz.at/
_______________________________________________________________
 
 

> -----Ursprüngliche Nachricht-----
> Von: Scott Schollenberger [mailto:scott.schollenberger@gmail.com]
> Gesendet: Dienstag, 9. November 2010 01:29
> An: trnsys-users@cae.wisc.edu
> Betreff: [TRNSYS-users] complex square root
> 
> Is it possible to take the square root of a negative number in Fortran 77?
> 
> Scott
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users@cae.wisc.edu
> https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users

Attachment: Hermann Schranzhofer.vcf
Description: Binary data