wmwv / cosmo

Go cosmology library
MIT License
7 stars 2 forks source link

Implement comoving distance with elliptic integrals #4

Closed wmwv closed 6 years ago

wmwv commented 6 years ago

Using elliptic integrals to speed of comoving distance calculation.

  1. [x] Legendre form
  2. [x] Carlson form.
wmwv commented 6 years ago

gonum.org/v1/gonum/mathext.EllipticF

actually just calls EllipticRF after some recomputing of terms, so there's no distinction.

wmwv commented 6 years ago

Elliptic integral form is 100 times faster than Gaussian quadrature fixed integration.

The quad.Fixed is still needed for Omega_M>=1, although I realize I could just use a simpler relation for Omega_m=1.