We establish disc formulas for the Siciak-Zahariuta extremal function of an arbitrary open subset of complex affine space. This function is also known as the pluricomplex Green function with logarithmic growth or a logarithmic pole at infinity. We extend Lempert's formula for this function from the convex case to the connected case.