mirror of
https://github.com/golang/go
synced 2024-11-18 13:44:48 -07:00
16 lines
253 B
Go
16 lines
253 B
Go
|
package issue9510a
|
||
|
|
||
|
/*
|
||
|
static double csquare(double a, double b) {
|
||
|
__complex__ double d;
|
||
|
__real__ d = a;
|
||
|
__imag__ d = b;
|
||
|
return __real__ (d * d);
|
||
|
}
|
||
|
*/
|
||
|
import "C"
|
||
|
|
||
|
func F(a, b float64) float64 {
|
||
|
return float64(C.csquare(C.double(a), C.double(b)))
|
||
|
}
|