Abstract: In 1914, Hardy and Littlewood published their celebrated approximate functional equation for quadratic Weyl sums (theta sums). Their result provides, by iterative application, a powerful tool for the asymptotic analysis of such sums. The classical Jacobi theta function, on the other hand, satisfies an exact functional equation, and extends to an automorphic function on the Jacobi group. We construct a related, almost everywhere non-differentiable automorphic function, which approximates quadratic Weyl sums up to an error of order one, uniformly in the summation range. This not only implies the approximate functional equation, but allows us to replace Hardy and Littlewood's renormalization approach by the dynamics of a certain homogeneous flow. The great advantage of this construction is that the approximation is global, i.e., there is no need to keep track of the error terms accumulating in an iterative procedure. Joint work with Jens Marklof.