[TRNSYS-users] complex square root

Hermann Schranzhofer hermann.schranzhofer at tugraz.at
Tue Nov 9 01:53:51 PST 2010


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 at gmail.com]
> Gesendet: Dienstag, 9. November 2010 01:29
> An: trnsys-users at 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 at cae.wisc.edu
> https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Hermann Schranzhofer.vcf
Type: application/octet-stream
Size: 208 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20101109/a6fa9601/attachment-0005.obj>


More information about the TRNSYS-users mailing list