summaryrefslogtreecommitdiff
path: root/src/pkg/cmath/tan.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-02-14 13:23:51 +0100
committerOndřej Surý <ondrej@sury.org>2011-02-14 13:23:51 +0100
commit758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 (patch)
tree6d6b34f8c678862fe9b56c945a7b63f68502c245 /src/pkg/cmath/tan.go
parent3e45412327a2654a77944249962b3652e6142299 (diff)
downloadgolang-upstream/2011-02-01.1.tar.gz
Imported Upstream version 2011-02-01.1upstream/2011-02-01.1
Diffstat (limited to 'src/pkg/cmath/tan.go')
-rw-r--r--src/pkg/cmath/tan.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/cmath/tan.go b/src/pkg/cmath/tan.go
index d1945cd79..94b517521 100644
--- a/src/pkg/cmath/tan.go
+++ b/src/pkg/cmath/tan.go
@@ -64,7 +64,7 @@ func Tan(x complex128) complex128 {
if d == 0 {
return Inf()
}
- return cmplx(math.Sin(2*real(x))/d, math.Sinh(2*imag(x))/d)
+ return complex(math.Sin(2*real(x))/d, math.Sinh(2*imag(x))/d)
}
// Complex hyperbolic tangent
@@ -85,7 +85,7 @@ func Tanh(x complex128) complex128 {
if d == 0 {
return Inf()
}
- return cmplx(math.Sinh(2*real(x))/d, math.Sin(2*imag(x))/d)
+ return complex(math.Sinh(2*real(x))/d, math.Sin(2*imag(x))/d)
}
// Program to subtract nearest integer multiple of PI
@@ -114,11 +114,11 @@ func tanSeries(z complex128) float64 {
x = reducePi(x)
x = x * x
y = y * y
- x2 := float64(1)
- y2 := float64(1)
- f := float64(1)
- rn := float64(0)
- d := float64(0)
+ x2 := 1.0
+ y2 := 1.0
+ f := 1.0
+ rn := 0.0
+ d := 0.0
for {
rn += 1
f *= rn
@@ -180,5 +180,5 @@ func Cot(x complex128) complex128 {
if d == 0 {
return Inf()
}
- return cmplx(math.Sin(2*real(x))/d, -math.Sinh(2*imag(x))/d)
+ return complex(math.Sin(2*real(x))/d, -math.Sinh(2*imag(x))/d)
}