Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/arm/go/misc/cgo/test/testdata/issue9510b/b.go

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


package issue9510b

/*
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)))
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.