github.com/bir3/gocompiler@v0.9.2202/src/cmd/cgo/internal/test/issue9510b/b.go (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package issue9510b 6 7 /* 8 static double csquare(double a, double b) { 9 __complex__ double d; 10 __real__ d = a; 11 __imag__ d = b; 12 return __real__ (d * d); 13 } 14 */ 15 import "C" 16 17 func F(a, b float64) float64 { 18 return float64(C.csquare(C.double(a), C.double(b))) 19 }