pbuk
Science Advisor
Homework Helper
Gold Member
- 4,970
- 3,222
Excellent, thank you, so adapting that slightly I can write:George Jones said:Common cosmological notation is ## [something] = \frac{H\left(z\right)^2}{H_0^2} =: E\left(z\right)^2##.
$$ E(s)^2 = \Omega_{[m,0]} s^3 + \Omega_{[rad,0]} s^4 + \Omega_{[\Lambda,0]} s^{3(1+w)} + \Omega_{[K,0]} s^2 $$
[The last term in the equation above was corrected from ## \Omega_{[K,0]} s^3 ##.]
[code lang=javascript title="Which I can implement for w = -1 as"]
const getESquaredAtS = (s) => {
const s2 = s * s;
return omegaM0 * s2 * s + omegaLambda0 + omegaRad0 * s2 * s2 + OmegaK * s2;
};
[/code]
.. and that saves a LOT of calculating square roots and then squaring, converting to different units and then back again.
Last edited: