I am looking at the Antony Lewis' paper
https://arxiv.org/pdf/0804.3865.pdf
for Eq.(B3) on page 11, there is this equation of number of free electron per hydrogen atom.
But for this equation, if [tex]z \rightarrow[/tex] large values, then y=(1+z)^3/2 will also become large values, while y(z_re) and [tex]\Delta_y[/tex] are fixed. Since "[tex]\tanh(x \rightarrow \infty) \rightarrow 1[/tex]", then for large redshift, [tex]x_{\rm e} \rightarrow 1[/tex].
If [tex]z \rightarrow 0[/tex], then [tex]\tanh[/tex] function will becomes a negative value but greater than 1, then [tex]x_{\rm e} \rightarrow 0[/tex].
So this is completely opposite to the trend of Fig.6 on the same page. Can anyone explain what is going on here?
Perhaps I made some stupid mistake, please point it out. Thank you.
Is the x_e equation in CAMB correct or not?

 Posts: 1842
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: Is the x_e equation in CAMB correct or not?
I think it's just a typo (code has y(zre)y in the tanh):
https://github.com/cmbant/CAMB/blob/mas ... on.f90#L80
https://github.com/cmbant/CAMB/blob/mas ... on.f90#L80
Is the x_e equation in CAMB correct or not?
Oh, then this typo affects the Planck reionization paper, the published version of Planck intermediate results XLVII. Planck constraints on reionization history,
page 5, equation 2
also takes this typo.
page 5, equation 2
also takes this typo.