Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(611)

Unified Diff: test/ken/cplx4.go

Issue 3991043: code review 3991043: delete float, complex - code changes (Closed)
Patch Set: code review 3991043: delete float, complex - code changes Created 14 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/ken/cplx3.go ('k') | test/ken/cplx5.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/ken/cplx4.go
===================================================================
--- a/test/ken/cplx4.go
+++ b/test/ken/cplx4.go
@@ -15,7 +15,7 @@
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 @@
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)
}
« no previous file with comments | « test/ken/cplx3.go ('k') | test/ken/cplx5.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b