  We show that, in ABJ(M) theories with N=8 supersymmetry, the non-perturbative
sector of the partition function on the three-sphere simplifies drastically.
Due to this simplification, we are able to write closed form expressions for
the grand potential of these theories, which determines the full large N
asymptotics. Moreover, we find explicit formulae for the generating functionals
of their partition functions, for all values of the rank N of the gauge group:
they involve Jacobi theta functions on the spectral curve associated to the
planar limit. Exact quantization conditions for the spectral problem of the
Fermi gas are then obtained from the vanishing of the theta function. We also
show that the partition function, as a function of N, can be extended in a
natural way to an entire function on the full complex plane, and we explore
some possible consequences of this fact for the quantum geometry of M-theory
and for putative de Sitter extensions.
