code: func (e *G2) Marshal() []byte {
  	// Each value is a 256-bit number.
  	const numBytes = 256 / 8
  
  	if e.p == nil {
  		e.p = &twistPoint{}
  	}
  
  	e.p.MakeAffine()
  	ret := make([]byte, numBytes*4)
  	if e.p.IsInfinity() {
  		return ret
  	}
  	temp := &gfP{}
  
  	montDecode(temp, &e.p.x.x)
  	temp.Marshal(ret)
  	montDecode(temp, &e.p.x.y)
  	temp.Marshal(ret[numBytes:])
  	montDecode(temp, &e.p.y.x)
  	temp.Marshal(ret[2*numBytes:])
  	montDecode(temp, &e.p.y.y)
  	temp.Marshal(ret[3*numBytes:])
  
  	return ret
  }
docs: // Marshal converts e into a byte slice.