summaryrefslogtreecommitdiff
path: root/test/ken/cplx4.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/ken/cplx4.go')
-rw-r--r--test/ken/cplx4.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ken/cplx4.go b/test/ken/cplx4.go
index 3c6f1f68c..8524e47ae 100644
--- a/test/ken/cplx4.go
+++ b/test/ken/cplx4.go
@@ -15,7 +15,7 @@ const (
C1 = R + I // ADD(5,6)
)
-func doprint(c complex) { fmt.Printf("c = %f\n", c) }
+func doprint(c complex128) { fmt.Printf("c = %f\n", c) }
func main() {
@@ -32,12 +32,12 @@ func main() {
c2 := complex128(C1)
fmt.Printf("c = %G\n", c2)
- // real, imag, cmplx
- c3 := cmplx(real(c2)+3, imag(c2)-5) + c2
+ // real, imag, complex
+ c3 := complex(real(c2)+3, imag(c2)-5) + c2
fmt.Printf("c = %G\n", c3)
// compiler used to crash on nested divide
- c4 := cmplx(real(c3/2), imag(c3/2))
+ c4 := complex(real(c3/2), imag(c3/2))
if c4 != c3/2 {
fmt.Printf("BUG: c3 = %G != c4 = %G\n", c3, c4)
}