Gauss-Legendre algorithm implementations.