func PolyOtimes(p1 Poly, p2 Poly) (result Poly) { cp1 := poly2ptr(p1) cp2 := poly2ptr(p2) result = ptr2poly(C.otimesPoly(cp1, cp2)) C.freePoly(cp1) C.freePoly(cp2) return }
func serie2ptr(s Serie) unsafe.Pointer { cp := poly2ptr(s.P) cq := poly2ptr(s.Q) cr := gd2ptr(s.R) cs := C.newSerie(cp, cq, cr) C.freePoly(cp) C.freePoly(cq) C.freeGd(cr) return cs }
func PolySimply(p Poly) (result Poly) { cpoly := poly2ptr(p) C.simplyPoly(cpoly) result = ptr2poly(cpoly) C.freePoly(cpoly) return }
func PolyStar(p Poly) (result Serie) { cpoly := poly2ptr(p) cserie := C.starPoly(cpoly) result = ptr2serie(cserie) C.freePoly(cpoly) C.freeSerie(cserie) return }