Validation

The implementation has been compared to the formulae of the sections [*] and [*] evaluated in quadruple precision, for reference declinations $\delta_0 = 0$, $\pm10^{-3}$, $\pm30$, $\pm60$, and $\pm90$ degrees, projection angles $\psi = 0$ and $25$ degrees, and 20000 random positions per case. The celestial to projection plane coordinates are accurate to about $10^{-15}$ in relative value, the projection plane to celestial coordinates to about $10^{-10}$ arcsec, and the round trips to better than $2\times10^{-10}$ arcsec up to $\theta = 172^\circ$.

The demonstration procedure gag_demo:demo-convert.greg exercises the command G $\backslash$CONVERT in both directions, for 7 projection centers (including the Equator, the poles, and a non-zero projection angle) and 21 positions each (including the reference point and its close neighborhood, the poles, the antipode, and longitude wrapping). The projected coordinates are compared to the formulae of the section [*], the round trip positions to the input ones, and an error is raised if any unexpected result is found.