projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Start development on BSD 1
[unix-history]
/
.ref-Research-V6
/
usr
/
source
/
fort
/
rt1
/
csqrt.f
function csqrt(z1)
complex csqrt, z1, z2
dimension dummy(2)
equivalence (a,z2,dummy(1)), (b,dummy(2))
z2 = z1
c = cabs(z2)
c = sqrt(c)
b = atan2(b, a)/2.0
a = c*cos(b)
b = c*sin(b)
csqrt = z2
return
end